shadPS4/src/common/config.h

146 lines
4.2 KiB
C
Raw Normal View History

2024-02-23 21:32:32 +00:00
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
2023-08-14 17:17:01 +00:00
#pragma once
2024-02-23 21:32:32 +00:00
2023-08-14 17:17:01 +00:00
#include <filesystem>
#include <vector>
2024-06-11 02:44:16 +00:00
#include "types.h"
2023-08-14 17:17:01 +00:00
namespace Config {
enum HideCursorState : s16 { Never, Idle, Always };
2023-08-14 17:17:01 +00:00
void load(const std::filesystem::path& path);
void save(const std::filesystem::path& path);
void saveMainWindow(const std::filesystem::path& path);
2023-08-14 17:17:01 +00:00
std::string getTrophyKey();
void setTrophyKey(std::string key);
bool getIsFullscreen();
std::string getFullscreenMode();
bool isNeoModeConsole();
bool getPlayBGM();
int getBGMvolume();
bool getisTrophyPopupDisabled();
bool getEnableDiscordRPC();
bool getSeparateUpdateEnabled();
bool getCompatibilityEnabled();
bool getCheckCompatibilityOnStartup();
std::string getLogFilter();
std::string getLogType();
2024-08-15 09:33:10 +00:00
std::string getUserName();
std::string getUpdateChannel();
2023-08-16 07:34:04 +00:00
s16 getCursorState();
int getCursorHideTimeout();
std::string getBackButtonBehavior();
bool getUseSpecialPad();
int getSpecialPadClass();
bool getIsMotionControlsEnabled();
2023-08-16 07:34:04 +00:00
u32 getScreenWidth();
u32 getScreenHeight();
s32 getGpuId();
2023-08-16 07:34:04 +00:00
bool debugDump();
bool collectShadersForDebug();
bool showSplash();
bool autoUpdate();
bool nullGpu();
bool copyGPUCmdBuffers();
2024-05-26 22:07:46 +00:00
bool dumpShaders();
2024-11-30 19:15:55 +00:00
bool patchShaders();
bool isRdocEnabled();
u32 vblankDiv();
2024-08-09 14:09:51 +00:00
void setDebugDump(bool enable);
void setCollectShaderForDebug(bool enable);
2024-08-09 14:09:51 +00:00
void setShowSplash(bool enable);
void setAutoUpdate(bool enable);
2024-08-09 14:09:51 +00:00
void setNullGpu(bool enable);
void setCopyGPUCmdBuffers(bool enable);
2024-08-09 14:09:51 +00:00
void setDumpShaders(bool enable);
void setVblankDiv(u32 value);
void setGpuId(s32 selectedGpuId);
2024-08-09 14:09:51 +00:00
void setScreenWidth(u32 width);
void setScreenHeight(u32 height);
void setIsFullscreen(bool enable);
void setFullscreenMode(std::string mode);
void setisTrophyPopupDisabled(bool disable);
void setPlayBGM(bool enable);
void setBGMvolume(int volume);
void setEnableDiscordRPC(bool enable);
2024-08-09 15:19:35 +00:00
void setLanguage(u32 language);
2024-08-09 14:09:51 +00:00
void setNeoMode(bool enable);
void setUserName(const std::string& type);
void setUpdateChannel(const std::string& type);
void setSeparateUpdateEnabled(bool use);
void setGameInstallDirs(const std::vector<std::filesystem::path>& settings_install_dirs_config);
void setCompatibilityEnabled(bool use);
void setCheckCompatibilityOnStartup(bool use);
2024-08-09 14:09:51 +00:00
void setCursorState(s16 cursorState);
void setCursorHideTimeout(int newcursorHideTimeout);
void setBackButtonBehavior(const std::string& type);
void setUseSpecialPad(bool use);
void setSpecialPadClass(int type);
void setIsMotionControlsEnabled(bool use);
void setLogType(const std::string& type);
void setLogFilter(const std::string& type);
2024-08-09 14:09:51 +00:00
void setVkValidation(bool enable);
void setVkSyncValidation(bool enable);
void setRdocEnabled(bool enable);
bool vkValidationEnabled();
bool vkValidationSyncEnabled();
bool vkValidationGpuEnabled();
bool vkMarkersEnabled();
bool vkCrashDiagnosticEnabled();
// Gui
void setMainWindowGeometry(u32 x, u32 y, u32 w, u32 h);
bool addGameInstallDir(const std::filesystem::path& dir);
void removeGameInstallDir(const std::filesystem::path& dir);
void setAddonInstallDir(const std::filesystem::path& dir);
void setMainWindowTheme(u32 theme);
void setIconSize(u32 size);
void setIconSizeGrid(u32 size);
void setSliderPosition(u32 pos);
void setSliderPositionGrid(u32 pos);
void setTableMode(u32 mode);
void setMainWindowWidth(u32 width);
void setMainWindowHeight(u32 height);
void setPkgViewer(const std::vector<std::string>& pkgList);
void setElfViewer(const std::vector<std::string>& elfList);
void setRecentFiles(const std::vector<std::string>& recentFiles);
2024-08-25 08:45:26 +00:00
void setEmulatorLanguage(std::string language);
u32 getMainWindowGeometryX();
u32 getMainWindowGeometryY();
u32 getMainWindowGeometryW();
u32 getMainWindowGeometryH();
const std::vector<std::filesystem::path>& getGameInstallDirs();
std::filesystem::path getAddonInstallDir();
u32 getMainWindowTheme();
u32 getIconSize();
u32 getIconSizeGrid();
u32 getSliderPosition();
u32 getSliderPositionGrid();
u32 getTableMode();
u32 getMainWindowWidth();
u32 getMainWindowHeight();
std::vector<std::string> getPkgViewer();
std::vector<std::string> getElfViewer();
std::vector<std::string> getRecentFiles();
2024-08-25 08:45:26 +00:00
std::string getEmulatorLanguage();
2024-08-09 14:09:51 +00:00
void setDefaultValues();
// settings
u32 GetLanguage();
}; // namespace Config