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>
|
2024-06-11 02:42:21 +00:00
|
|
|
#include <vector>
|
2024-06-11 02:44:16 +00:00
|
|
|
#include "types.h"
|
2023-08-14 17:17:01 +00:00
|
|
|
|
|
|
|
namespace Config {
|
2024-10-08 06:47:42 +00:00
|
|
|
|
|
|
|
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);
|
2024-12-12 20:46:31 +00:00
|
|
|
void saveMainWindow(const std::filesystem::path& path);
|
2023-08-14 17:17:01 +00:00
|
|
|
|
2025-01-01 10:04:51 +00:00
|
|
|
std::string getTrophyKey();
|
|
|
|
void setTrophyKey(std::string key);
|
2025-01-07 13:30:05 +00:00
|
|
|
bool getIsFullscreen();
|
|
|
|
std::string getFullscreenMode();
|
2025-01-03 23:29:09 +00:00
|
|
|
bool isNeoModeConsole();
|
2024-09-26 06:12:41 +00:00
|
|
|
bool getPlayBGM();
|
2024-09-28 16:54:28 +00:00
|
|
|
int getBGMvolume();
|
2024-12-22 13:46:45 +00:00
|
|
|
bool getisTrophyPopupDisabled();
|
2024-10-08 15:14:37 +00:00
|
|
|
bool getEnableDiscordRPC();
|
2024-10-15 15:49:42 +00:00
|
|
|
bool getSeparateUpdateEnabled();
|
2024-12-22 09:05:44 +00:00
|
|
|
bool getCompatibilityEnabled();
|
|
|
|
bool getCheckCompatibilityOnStartup();
|
2024-09-28 16:54:28 +00:00
|
|
|
|
2024-02-27 22:10:34 +00:00
|
|
|
std::string getLogFilter();
|
2024-03-11 12:06:39 +00:00
|
|
|
std::string getLogType();
|
2024-08-15 09:33:10 +00:00
|
|
|
std::string getUserName();
|
2024-09-24 20:03:15 +00:00
|
|
|
std::string getUpdateChannel();
|
2023-08-16 07:34:04 +00:00
|
|
|
|
2024-10-10 14:52:39 +00:00
|
|
|
s16 getCursorState();
|
|
|
|
int getCursorHideTimeout();
|
|
|
|
std::string getBackButtonBehavior();
|
2024-08-28 09:27:51 +00:00
|
|
|
bool getUseSpecialPad();
|
|
|
|
int getSpecialPadClass();
|
2025-01-07 09:50:54 +00:00
|
|
|
bool getIsMotionControlsEnabled();
|
2024-08-28 09:27:51 +00:00
|
|
|
|
2023-08-16 07:34:04 +00:00
|
|
|
u32 getScreenWidth();
|
|
|
|
u32 getScreenHeight();
|
2024-04-29 21:19:12 +00:00
|
|
|
s32 getGpuId();
|
2023-08-16 07:34:04 +00:00
|
|
|
|
2024-03-11 11:26:33 +00:00
|
|
|
bool debugDump();
|
2024-12-01 18:34:29 +00:00
|
|
|
bool collectShadersForDebug();
|
2024-05-16 13:58:14 +00:00
|
|
|
bool showSplash();
|
2024-09-24 20:03:15 +00:00
|
|
|
bool autoUpdate();
|
2024-05-22 18:19:42 +00:00
|
|
|
bool nullGpu();
|
2024-08-27 21:16:14 +00:00
|
|
|
bool copyGPUCmdBuffers();
|
2024-05-26 22:07:46 +00:00
|
|
|
bool dumpShaders();
|
2024-11-30 19:15:55 +00:00
|
|
|
bool patchShaders();
|
2024-07-28 13:54:09 +00:00
|
|
|
bool isRdocEnabled();
|
|
|
|
u32 vblankDiv();
|
2024-03-11 11:26:33 +00:00
|
|
|
|
2024-08-09 14:09:51 +00:00
|
|
|
void setDebugDump(bool enable);
|
2024-12-01 18:34:29 +00:00
|
|
|
void setCollectShaderForDebug(bool enable);
|
2024-08-09 14:09:51 +00:00
|
|
|
void setShowSplash(bool enable);
|
2024-09-24 20:03:15 +00:00
|
|
|
void setAutoUpdate(bool enable);
|
2024-08-09 14:09:51 +00:00
|
|
|
void setNullGpu(bool enable);
|
2024-08-27 21:16:14 +00:00
|
|
|
void setCopyGPUCmdBuffers(bool enable);
|
2024-08-09 14:09:51 +00:00
|
|
|
void setDumpShaders(bool enable);
|
|
|
|
void setVblankDiv(u32 value);
|
2024-08-13 21:21:06 +00:00
|
|
|
void setGpuId(s32 selectedGpuId);
|
2024-08-09 14:09:51 +00:00
|
|
|
void setScreenWidth(u32 width);
|
|
|
|
void setScreenHeight(u32 height);
|
2025-01-07 13:30:05 +00:00
|
|
|
void setIsFullscreen(bool enable);
|
|
|
|
void setFullscreenMode(std::string mode);
|
2024-12-22 13:46:45 +00:00
|
|
|
void setisTrophyPopupDisabled(bool disable);
|
2024-09-26 06:12:41 +00:00
|
|
|
void setPlayBGM(bool enable);
|
2024-09-28 16:54:28 +00:00
|
|
|
void setBGMvolume(int volume);
|
2024-10-08 15:14:37 +00:00
|
|
|
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);
|
2024-08-21 23:56:01 +00:00
|
|
|
void setUserName(const std::string& type);
|
2024-09-24 20:03:15 +00:00
|
|
|
void setUpdateChannel(const std::string& type);
|
2024-10-15 15:49:42 +00:00
|
|
|
void setSeparateUpdateEnabled(bool use);
|
2024-12-12 20:46:31 +00:00
|
|
|
void setGameInstallDirs(const std::vector<std::filesystem::path>& settings_install_dirs_config);
|
2024-12-22 09:05:44 +00:00
|
|
|
void setCompatibilityEnabled(bool use);
|
|
|
|
void setCheckCompatibilityOnStartup(bool use);
|
2024-08-09 14:09:51 +00:00
|
|
|
|
2024-10-10 14:52:39 +00:00
|
|
|
void setCursorState(s16 cursorState);
|
|
|
|
void setCursorHideTimeout(int newcursorHideTimeout);
|
|
|
|
void setBackButtonBehavior(const std::string& type);
|
2024-08-28 09:27:51 +00:00
|
|
|
void setUseSpecialPad(bool use);
|
|
|
|
void setSpecialPadClass(int type);
|
2025-01-07 09:50:54 +00:00
|
|
|
void setIsMotionControlsEnabled(bool use);
|
2024-08-28 09:27:51 +00:00
|
|
|
|
2024-08-21 23:56:01 +00:00
|
|
|
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);
|
|
|
|
|
2024-06-07 07:12:43 +00:00
|
|
|
bool vkValidationEnabled();
|
|
|
|
bool vkValidationSyncEnabled();
|
2024-08-12 11:46:45 +00:00
|
|
|
bool vkValidationGpuEnabled();
|
2024-09-03 19:56:23 +00:00
|
|
|
bool vkMarkersEnabled();
|
|
|
|
bool vkCrashDiagnosticEnabled();
|
2024-06-07 07:12:43 +00:00
|
|
|
|
2024-06-11 02:42:21 +00:00
|
|
|
// Gui
|
|
|
|
void setMainWindowGeometry(u32 x, u32 y, u32 w, u32 h);
|
2024-10-11 06:27:28 +00:00
|
|
|
bool addGameInstallDir(const std::filesystem::path& dir);
|
|
|
|
void removeGameInstallDir(const std::filesystem::path& dir);
|
2024-10-01 04:54:15 +00:00
|
|
|
void setAddonInstallDir(const std::filesystem::path& dir);
|
2024-06-11 02:42:21 +00:00
|
|
|
void setMainWindowTheme(u32 theme);
|
|
|
|
void setIconSize(u32 size);
|
|
|
|
void setIconSizeGrid(u32 size);
|
2024-08-26 12:22:11 +00:00
|
|
|
void setSliderPosition(u32 pos);
|
|
|
|
void setSliderPositionGrid(u32 pos);
|
2024-06-11 02:42:21 +00:00
|
|
|
void setTableMode(u32 mode);
|
|
|
|
void setMainWindowWidth(u32 width);
|
|
|
|
void setMainWindowHeight(u32 height);
|
2024-08-21 23:56:01 +00:00
|
|
|
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);
|
2024-06-11 02:42:21 +00:00
|
|
|
|
|
|
|
u32 getMainWindowGeometryX();
|
|
|
|
u32 getMainWindowGeometryY();
|
|
|
|
u32 getMainWindowGeometryW();
|
|
|
|
u32 getMainWindowGeometryH();
|
2024-10-11 06:27:28 +00:00
|
|
|
const std::vector<std::filesystem::path>& getGameInstallDirs();
|
2024-10-01 04:54:15 +00:00
|
|
|
std::filesystem::path getAddonInstallDir();
|
2024-06-11 02:42:21 +00:00
|
|
|
u32 getMainWindowTheme();
|
|
|
|
u32 getIconSize();
|
|
|
|
u32 getIconSizeGrid();
|
2024-08-26 12:22:11 +00:00
|
|
|
u32 getSliderPosition();
|
|
|
|
u32 getSliderPositionGrid();
|
2024-06-11 02:42:21 +00:00
|
|
|
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-06-11 02:42:21 +00:00
|
|
|
|
2024-08-09 14:09:51 +00:00
|
|
|
void setDefaultValues();
|
|
|
|
|
2024-08-09 08:58:42 +00:00
|
|
|
// settings
|
|
|
|
u32 GetLanguage();
|
2025-01-07 09:50:54 +00:00
|
|
|
}; // namespace Config
|