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 {
|
|
|
|
void load(const std::filesystem::path& path);
|
|
|
|
void save(const std::filesystem::path& path);
|
|
|
|
|
|
|
|
bool isNeoMode();
|
2024-06-09 10:25:00 +00:00
|
|
|
bool isFullscreenMode();
|
2024-09-26 06:12:41 +00:00
|
|
|
bool getPlayBGM();
|
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-08-28 09:27:51 +00:00
|
|
|
bool getUseSpecialPad();
|
|
|
|
int getSpecialPadClass();
|
|
|
|
|
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-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-06-01 20:50:03 +00:00
|
|
|
bool dumpPM4();
|
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);
|
|
|
|
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 setDumpPM4(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);
|
|
|
|
void setFullscreenMode(bool enable);
|
2024-09-26 06:12:41 +00:00
|
|
|
void setPlayBGM(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-08-09 14:09:51 +00:00
|
|
|
|
2024-08-28 09:27:51 +00:00
|
|
|
void setUseSpecialPad(bool use);
|
|
|
|
void setSpecialPadClass(int type);
|
|
|
|
|
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-09-26 08:41:59 +00:00
|
|
|
void setGameInstallDir(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-09-26 08:41:59 +00:00
|
|
|
std::filesystem::path getGameInstallDir();
|
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();
|
2024-02-23 20:57:57 +00:00
|
|
|
}; // namespace Config
|