2012-11-01 15:19:01 +00:00
|
|
|
// Copyright (c) 2012- PPSSPP Project.
|
|
|
|
|
|
|
|
// This program is free software: you can redistribute it and/or modify
|
|
|
|
// it under the terms of the GNU General Public License as published by
|
2012-11-04 22:01:49 +00:00
|
|
|
// the Free Software Foundation, version 2.0 or later versions.
|
2012-11-01 15:19:01 +00:00
|
|
|
|
|
|
|
// This program is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
// GNU General Public License 2.0 for more details.
|
|
|
|
|
|
|
|
// A copy of the GPL 2.0 should have been included with the program.
|
|
|
|
// If not, see http://www.gnu.org/licenses/
|
|
|
|
|
|
|
|
// Official git repository and contact information can be found at
|
|
|
|
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <string>
|
2014-01-03 13:32:33 +00:00
|
|
|
#include <map>
|
2013-03-24 19:03:42 +00:00
|
|
|
#include <vector>
|
2013-07-06 17:08:59 +00:00
|
|
|
|
2019-06-06 21:16:27 +00:00
|
|
|
#include "ppsspp_config.h"
|
2021-05-05 23:31:38 +00:00
|
|
|
|
2017-02-24 23:52:42 +00:00
|
|
|
#include "Common/CommonTypes.h"
|
2021-05-05 23:31:38 +00:00
|
|
|
#include "Common/File/Path.h"
|
2019-06-22 18:48:36 +00:00
|
|
|
#include "Core/ConfigValues.h"
|
2012-11-01 15:19:01 +00:00
|
|
|
|
2013-03-02 20:31:11 +00:00
|
|
|
extern const char *PPSSPP_GIT_VERSION;
|
2012-11-01 15:19:01 +00:00
|
|
|
|
2016-12-05 03:04:31 +00:00
|
|
|
enum ChatPositions {
|
|
|
|
BOTTOM_LEFT = 0,
|
|
|
|
BOTTOM_CENTER = 1,
|
|
|
|
BOTOM_RIGHT = 2,
|
|
|
|
TOP_LEFT = 3,
|
|
|
|
TOP_CENTER = 4,
|
|
|
|
TOP_RIGHT = 5,
|
|
|
|
CENTER_LEFT = 6,
|
|
|
|
CENTER_RIGHT = 7,
|
|
|
|
};
|
|
|
|
|
2013-11-26 13:04:29 +00:00
|
|
|
namespace http {
|
|
|
|
class Download;
|
|
|
|
class Downloader;
|
|
|
|
}
|
|
|
|
|
2014-02-10 01:15:00 +00:00
|
|
|
struct UrlEncoder;
|
2022-07-12 06:46:09 +00:00
|
|
|
struct ConfigPrivate;
|
2014-02-10 01:15:00 +00:00
|
|
|
|
2018-06-17 05:14:41 +00:00
|
|
|
struct ConfigTouchPos {
|
|
|
|
float x;
|
|
|
|
float y;
|
|
|
|
float scale;
|
|
|
|
// Note: Show is not used for all settings.
|
|
|
|
bool show;
|
|
|
|
};
|
|
|
|
|
2021-03-04 09:37:35 +00:00
|
|
|
struct ConfigCustomButton {
|
|
|
|
uint64_t key;
|
|
|
|
int image;
|
|
|
|
int shape;
|
|
|
|
bool toggle;
|
2022-06-19 13:18:05 +00:00
|
|
|
bool repeat;
|
2021-03-04 09:37:35 +00:00
|
|
|
};
|
|
|
|
|
2013-08-24 00:16:10 +00:00
|
|
|
struct Config {
|
2012-11-01 15:19:01 +00:00
|
|
|
public:
|
2013-03-24 19:03:42 +00:00
|
|
|
Config();
|
|
|
|
~Config();
|
2012-11-01 15:19:01 +00:00
|
|
|
|
2012-12-25 07:34:19 +00:00
|
|
|
// Whether to save the config on close.
|
2012-11-01 15:19:01 +00:00
|
|
|
bool bSaveSettings;
|
2013-06-01 17:01:43 +00:00
|
|
|
bool bFirstRun;
|
2020-08-18 07:47:22 +00:00
|
|
|
bool bGameSpecific = false;
|
|
|
|
bool bUpdatedInstanceCounter = false;
|
2013-06-01 17:01:43 +00:00
|
|
|
|
2013-11-26 09:24:31 +00:00
|
|
|
int iRunCount; // To be used to for example check for updates every 10 runs and things like that.
|
|
|
|
|
2013-01-04 09:26:14 +00:00
|
|
|
bool bAutoRun; // start immediately
|
2013-08-27 21:36:04 +00:00
|
|
|
bool bBrowse; // when opening the emulator, immediately show a file browser
|
|
|
|
|
2013-05-01 12:08:01 +00:00
|
|
|
// General
|
2013-07-07 22:10:23 +00:00
|
|
|
bool bScreenshotsAsPNG;
|
2016-08-27 18:38:05 +00:00
|
|
|
bool bUseFFV1;
|
|
|
|
bool bDumpFrames;
|
2019-06-03 10:21:22 +00:00
|
|
|
bool bDumpVideoOutput;
|
2016-09-03 14:06:40 +00:00
|
|
|
bool bDumpAudio;
|
2017-11-14 04:12:27 +00:00
|
|
|
bool bSaveLoadResetsAVdumping;
|
2013-07-27 23:59:08 +00:00
|
|
|
bool bEnableLogging;
|
2014-02-27 06:19:32 +00:00
|
|
|
bool bDumpDecryptedEboot;
|
2015-10-14 15:45:21 +00:00
|
|
|
bool bFullscreenOnDoubleclick;
|
2019-08-21 08:17:33 +00:00
|
|
|
|
|
|
|
// These four are Win UI only
|
2013-10-11 11:53:25 +00:00
|
|
|
bool bPauseOnLostFocus;
|
2013-08-27 21:36:04 +00:00
|
|
|
bool bTopMost;
|
2014-01-07 20:32:58 +00:00
|
|
|
bool bIgnoreWindowsKey;
|
2017-05-21 15:24:40 +00:00
|
|
|
bool bRestartRequired;
|
2019-08-21 08:17:33 +00:00
|
|
|
|
2018-06-09 18:34:12 +00:00
|
|
|
std::string sFont;
|
2014-04-26 05:00:45 +00:00
|
|
|
|
2014-06-30 17:04:44 +00:00
|
|
|
bool bPauseWhenMinimized;
|
|
|
|
|
2019-08-21 08:17:33 +00:00
|
|
|
// Not used on mobile devices.
|
2014-04-26 05:54:32 +00:00
|
|
|
bool bPauseExitsEmulator;
|
2019-08-21 08:17:33 +00:00
|
|
|
|
2018-04-02 14:31:26 +00:00
|
|
|
bool bPauseMenuExitsEmulator;
|
2014-04-26 05:00:45 +00:00
|
|
|
|
2012-12-25 07:34:19 +00:00
|
|
|
// Core
|
2012-11-01 15:19:01 +00:00
|
|
|
bool bIgnoreBadMemAccess;
|
2020-07-04 18:57:05 +00:00
|
|
|
|
2012-12-21 15:49:02 +00:00
|
|
|
bool bFastMemory;
|
2016-05-06 21:45:37 +00:00
|
|
|
int iCpuCore;
|
2013-12-12 14:58:46 +00:00
|
|
|
bool bCheckForNewVersion;
|
2014-06-01 07:52:10 +00:00
|
|
|
bool bForceLagSync;
|
2014-06-07 07:13:45 +00:00
|
|
|
bool bFuncReplacements;
|
2017-03-12 03:31:00 +00:00
|
|
|
bool bHideSlowWarnings;
|
2018-06-15 00:54:13 +00:00
|
|
|
bool bHideStateWarnings;
|
2018-01-07 00:43:38 +00:00
|
|
|
bool bPreloadFunctions;
|
2019-02-03 21:58:24 +00:00
|
|
|
uint32_t uJitDisableFlags;
|
2013-12-12 14:58:46 +00:00
|
|
|
|
2015-11-15 19:03:16 +00:00
|
|
|
bool bSeparateSASThread;
|
|
|
|
int iIOTimingMethod;
|
2013-06-12 21:15:45 +00:00
|
|
|
int iLockedCPUSpeed;
|
2013-03-31 04:42:43 +00:00
|
|
|
bool bAutoSaveSymbolMap;
|
2014-10-30 23:14:00 +00:00
|
|
|
bool bCacheFullIsoInRam;
|
2016-07-04 04:09:17 +00:00
|
|
|
int iRemoteISOPort;
|
2017-02-14 02:18:14 +00:00
|
|
|
std::string sLastRemoteISOServer;
|
|
|
|
int iLastRemoteISOPort;
|
2017-02-22 01:45:58 +00:00
|
|
|
bool bRemoteISOManual;
|
2017-12-11 02:30:28 +00:00
|
|
|
bool bRemoteShareOnStartup;
|
2017-02-22 01:45:58 +00:00
|
|
|
std::string sRemoteISOSubdir;
|
2018-04-21 20:54:44 +00:00
|
|
|
bool bRemoteDebuggerOnStartup;
|
2016-08-06 04:27:53 +00:00
|
|
|
bool bMemStickInserted;
|
2020-10-08 15:51:56 +00:00
|
|
|
int iMemStickSizeGB;
|
2020-08-26 02:54:51 +00:00
|
|
|
bool bLoadPlugins;
|
2015-05-12 19:01:15 +00:00
|
|
|
|
|
|
|
int iScreenRotation; // The rotation angle of the PPSSPP UI. Only supported on Android and possibly other mobile platforms.
|
|
|
|
int iInternalScreenRotation; // The internal screen rotation angle. Useful for vertical SHMUPs and similar.
|
2014-02-04 11:58:37 +00:00
|
|
|
|
2013-03-01 16:51:01 +00:00
|
|
|
std::string sReportHost;
|
2013-12-08 06:39:35 +00:00
|
|
|
std::vector<std::string> vPinnedPaths;
|
2013-09-16 23:47:25 +00:00
|
|
|
std::string sLanguageIni;
|
2012-12-21 10:08:54 +00:00
|
|
|
|
2022-07-04 21:48:48 +00:00
|
|
|
std::string sIgnoreCompatSettings;
|
|
|
|
|
2018-08-12 22:08:56 +00:00
|
|
|
bool bDiscordPresence; // Enables setting the Discord presence to the current game (or menu)
|
|
|
|
|
2012-12-21 10:08:54 +00:00
|
|
|
// GFX
|
2014-08-17 14:07:14 +00:00
|
|
|
int iGPUBackend;
|
2018-09-01 20:57:20 +00:00
|
|
|
std::string sFailedGPUBackends;
|
2019-06-22 18:48:36 +00:00
|
|
|
std::string sDisabledGPUBackends;
|
2018-04-15 07:56:37 +00:00
|
|
|
// We have separate device parameters for each backend so it doesn't get erased if you switch backends.
|
|
|
|
// If not set, will use the "best" device.
|
2018-06-06 08:24:16 +00:00
|
|
|
std::string sVulkanDevice;
|
2019-08-21 08:17:33 +00:00
|
|
|
std::string sD3D11Device; // Windows only
|
2020-01-09 13:57:09 +00:00
|
|
|
std::string sCameraDevice;
|
2020-07-31 02:24:17 +00:00
|
|
|
std::string sMicDevice;
|
2019-08-21 08:17:33 +00:00
|
|
|
|
2013-08-16 19:48:30 +00:00
|
|
|
bool bSoftwareRendering;
|
2021-11-23 04:26:52 +00:00
|
|
|
bool bSoftwareRenderingJit;
|
2013-08-16 19:48:30 +00:00
|
|
|
bool bHardwareTransform; // only used in the GLES backend
|
2022-11-06 18:20:10 +00:00
|
|
|
bool bSoftwareSkinning;
|
2018-12-15 09:44:05 +00:00
|
|
|
bool bVendorBugChecksEnabled;
|
2022-10-02 14:41:36 +00:00
|
|
|
bool bUseGeometryShader;
|
2013-11-10 12:18:52 +00:00
|
|
|
|
2022-11-06 18:20:10 +00:00
|
|
|
// Speedhacks (more will be moved here):
|
|
|
|
bool bSkipBufferEffects;
|
|
|
|
|
2021-09-02 22:06:49 +00:00
|
|
|
int iTexFiltering; // 1 = auto , 2 = nearest , 3 = linear , 4 = auto max quality
|
2014-08-08 18:51:15 +00:00
|
|
|
int iBufFilter; // 1 = linear, 2 = nearest
|
2022-11-27 09:04:26 +00:00
|
|
|
|
|
|
|
bool bDisplayStretch; // Automatically matches the aspect ratio of the window.
|
|
|
|
float fDisplayOffsetX;
|
|
|
|
float fDisplayOffsetY;
|
|
|
|
float fDisplayScale; // Relative to the most constraining axis (x or y).
|
|
|
|
float fDisplayAspectRatio; // Stored relative to the PSP's native ratio, so 1.0 is the normal pixel aspect ratio.
|
|
|
|
|
|
|
|
bool bImmersiveMode; // Mode on Android Kitkat 4.4 and later that hides the back button etc.
|
2017-06-09 13:29:57 +00:00
|
|
|
bool bSustainedPerformanceMode; // Android: Slows clocks down to avoid overheating/speed fluctuations.
|
2020-07-05 20:46:04 +00:00
|
|
|
bool bIgnoreScreenInsets; // Android: Center screen disregarding insets if this is enabled.
|
2013-07-20 14:03:52 +00:00
|
|
|
bool bVSync;
|
2022-09-16 22:36:43 +00:00
|
|
|
|
2013-05-02 19:36:36 +00:00
|
|
|
int iFrameSkip;
|
2018-11-03 01:33:41 +00:00
|
|
|
int iFrameSkipType;
|
2021-08-17 14:48:47 +00:00
|
|
|
int iFastForwardMode; // See FastForwardMode in ConfigValues.h.
|
2014-01-25 16:41:39 +00:00
|
|
|
bool bAutoFrameSkip;
|
2013-02-13 17:21:21 +00:00
|
|
|
|
2019-10-25 09:01:49 +00:00
|
|
|
bool bEnableCardboardVR; // Cardboard Master Switch
|
2019-10-25 08:34:08 +00:00
|
|
|
int iCardboardScreenSize; // Screen Size (in %)
|
|
|
|
int iCardboardXShift; // X-Shift of Screen (in %)
|
|
|
|
int iCardboardYShift; // Y-Shift of Screen (in %)
|
|
|
|
|
2013-03-30 16:49:02 +00:00
|
|
|
int iWindowX;
|
|
|
|
int iWindowY;
|
2013-09-10 22:19:34 +00:00
|
|
|
int iWindowWidth; // Windows and other windowed environments
|
|
|
|
int iWindowHeight;
|
2022-09-29 16:51:21 +00:00
|
|
|
bool bShowMenuBar; // Windows-only
|
2013-09-10 22:19:34 +00:00
|
|
|
|
2022-02-11 14:12:52 +00:00
|
|
|
float fUITint;
|
|
|
|
float fUISaturation;
|
|
|
|
|
2013-01-19 16:05:08 +00:00
|
|
|
bool bVertexCache;
|
2013-12-29 22:43:45 +00:00
|
|
|
bool bTextureBackoffCache;
|
2013-11-09 17:16:26 +00:00
|
|
|
bool bVertexDecoderJit;
|
2013-01-27 13:05:09 +00:00
|
|
|
bool bFullScreen;
|
2017-07-30 15:33:02 +00:00
|
|
|
bool bFullScreenMulti;
|
2022-05-28 22:47:12 +00:00
|
|
|
int iForceFullScreen = -1; // -1 = nope, 0 = force off, 1 = force on (not saved.)
|
2013-09-10 22:19:34 +00:00
|
|
|
int iInternalResolution; // 0 = Auto (native), 1 = 1x (480x272), 2 = 2x, 3 = 3x, 4 = 4x and so on.
|
2013-07-17 20:27:05 +00:00
|
|
|
int iAnisotropyLevel; // 0 - 5, powers of 2: 0 = 1x = no aniso
|
2022-11-27 10:39:44 +00:00
|
|
|
int iMultiSampleLevel;
|
2016-01-21 06:00:07 +00:00
|
|
|
int bHighQualityDepth;
|
2016-04-30 21:05:03 +00:00
|
|
|
bool bReplaceTextures;
|
|
|
|
bool bSaveNewTextures;
|
2018-10-01 00:55:51 +00:00
|
|
|
bool bIgnoreTextureFilenames;
|
2018-06-17 02:20:23 +00:00
|
|
|
int iTexScalingLevel; // 0 = auto, 1 = off, 2 = 2x, ..., 5 = 5x
|
2013-05-03 08:29:29 +00:00
|
|
|
int iTexScalingType; // 0 = xBRZ, 1 = Hybrid
|
2013-05-03 14:21:46 +00:00
|
|
|
bool bTexDeposterize;
|
2019-09-30 01:10:55 +00:00
|
|
|
bool bTexHardwareScaling;
|
2018-06-17 03:07:11 +00:00
|
|
|
int iFpsLimit1;
|
|
|
|
int iFpsLimit2;
|
2022-07-04 20:10:42 +00:00
|
|
|
int iAnalogFpsLimit;
|
2013-05-19 14:40:01 +00:00
|
|
|
int iMaxRecent;
|
2013-07-21 11:31:46 +00:00
|
|
|
int iCurrentStateSlot;
|
2023-02-13 10:17:03 +00:00
|
|
|
int iRewindSnapshotInterval;
|
2020-08-03 09:58:55 +00:00
|
|
|
bool bUISound;
|
2018-03-17 21:00:06 +00:00
|
|
|
bool bEnableStateUndo;
|
2021-08-03 08:04:49 +00:00
|
|
|
std::string sStateLoadUndoGame;
|
2021-08-07 11:28:43 +00:00
|
|
|
std::string sStateUndoLastSaveGame;
|
|
|
|
int iStateUndoLastSaveSlot;
|
2018-06-21 08:00:57 +00:00
|
|
|
int iAutoLoadSaveState; // 0 = off, 1 = oldest, 2 = newest, >2 = slot number + 3
|
2013-05-23 11:10:39 +00:00
|
|
|
bool bEnableCheats;
|
2013-05-30 07:08:20 +00:00
|
|
|
bool bReloadCheats;
|
2015-01-26 23:50:50 +00:00
|
|
|
int iCwCheatRefreshRate;
|
2020-03-26 09:59:08 +00:00
|
|
|
float fCwCheatScrollPosition;
|
2020-11-23 09:06:48 +00:00
|
|
|
float fGameListScrollPosition;
|
2015-01-23 01:08:20 +00:00
|
|
|
int iBloomHack; //0 = off, 1 = safe, 2 = balanced, 3 = aggressive
|
2022-11-06 18:30:17 +00:00
|
|
|
bool bSkipGPUReadbacks;
|
2014-04-25 12:44:02 +00:00
|
|
|
int iSplineBezierQuality; // 0 = low , 1 = Intermediate , 2 = High
|
2017-01-06 15:14:58 +00:00
|
|
|
bool bHardwareTessellation;
|
2021-11-21 20:23:15 +00:00
|
|
|
bool bShaderCache; // Hidden ini-only setting, useful for debugging shader compile times.
|
2020-05-18 09:17:45 +00:00
|
|
|
|
|
|
|
std::vector<std::string> vPostShaderNames; // Off for chain end (only Off for no shader)
|
2020-05-15 22:52:38 +00:00
|
|
|
std::map<std::string, float> mPostShaderSetting;
|
2022-10-21 10:35:49 +00:00
|
|
|
|
|
|
|
// Note that this is separate from VR stereo, though it'll share some code paths.
|
|
|
|
bool bStereoRendering;
|
|
|
|
// There can only be one, unlike regular post shaders.
|
|
|
|
std::string sStereoToMonoShader;
|
|
|
|
|
2020-09-15 05:45:57 +00:00
|
|
|
bool bShaderChainRequires60FPS;
|
2020-05-18 09:17:45 +00:00
|
|
|
std::string sTextureShaderName;
|
2015-10-11 09:46:24 +00:00
|
|
|
bool bGfxDebugOutput;
|
2020-03-01 16:53:46 +00:00
|
|
|
int iInflightFrames;
|
2020-01-29 09:16:03 +00:00
|
|
|
bool bRenderDuplicateFrames;
|
2012-12-25 07:34:19 +00:00
|
|
|
|
|
|
|
// Sound
|
|
|
|
bool bEnableSound;
|
2015-01-24 12:50:27 +00:00
|
|
|
int iAudioBackend;
|
2016-01-18 06:47:29 +00:00
|
|
|
int iGlobalVolume;
|
2021-08-10 03:47:24 +00:00
|
|
|
int iReverbVolume;
|
2019-06-23 20:34:08 +00:00
|
|
|
int iAltSpeedVolume;
|
2016-12-01 20:35:32 +00:00
|
|
|
bool bExtraAudioBuffering; // For bluetooth
|
2019-09-15 19:54:55 +00:00
|
|
|
std::string sAudioDevice;
|
2019-09-15 20:42:56 +00:00
|
|
|
bool bAutoAudioDevice;
|
2013-06-17 18:28:22 +00:00
|
|
|
|
2013-10-10 14:44:12 +00:00
|
|
|
// UI
|
|
|
|
bool bShowDebuggerOnLoad;
|
2023-01-28 23:25:00 +00:00
|
|
|
int iShowStatusFlags;
|
2020-02-23 07:33:44 +00:00
|
|
|
bool bShowRegionOnGameIcon;
|
2020-02-23 13:01:15 +00:00
|
|
|
bool bShowIDOnGameIcon;
|
2020-03-01 14:34:35 +00:00
|
|
|
float fGameGridScale;
|
2020-11-22 18:08:14 +00:00
|
|
|
bool bShowOnScreenMessages;
|
2021-03-23 22:41:16 +00:00
|
|
|
int iBackgroundAnimation; // enum BackgroundAnimation
|
2022-12-16 08:09:21 +00:00
|
|
|
bool bTransparentBackground;
|
2015-01-29 11:55:49 +00:00
|
|
|
|
2022-02-11 11:32:23 +00:00
|
|
|
std::string sThemeName;
|
2017-03-26 16:51:33 +00:00
|
|
|
|
2023-03-31 18:12:48 +00:00
|
|
|
// These aren't saved, just for instant debugging.
|
2017-03-24 02:16:17 +00:00
|
|
|
bool bLogFrameDrops;
|
2012-11-22 22:07:15 +00:00
|
|
|
bool bShowDebugStats;
|
2015-01-29 11:55:49 +00:00
|
|
|
bool bShowAudioDebug;
|
2023-03-31 18:12:48 +00:00
|
|
|
bool bShowControlDebug;
|
2019-08-20 22:03:00 +00:00
|
|
|
bool bShowGpuProfile;
|
2013-10-27 17:58:47 +00:00
|
|
|
|
2023-02-01 15:07:01 +00:00
|
|
|
// Analog stick tilting
|
2023-02-16 10:07:57 +00:00
|
|
|
// This is the held base angle (from the horizon), that we compute the tilt relative from.
|
2023-02-01 15:07:01 +00:00
|
|
|
float fTiltBaseAngleY;
|
2023-02-16 10:07:57 +00:00
|
|
|
// Inverts the direction of the x axes and y axes for the purposes of tilt input.
|
2023-02-11 22:42:55 +00:00
|
|
|
bool bInvertTiltX;
|
|
|
|
bool bInvertTiltY;
|
|
|
|
// The sensitivity of the tilt in the X and Y directions, separately.
|
2013-10-27 17:58:47 +00:00
|
|
|
int iTiltSensitivityX;
|
|
|
|
int iTiltSensitivityY;
|
2023-02-16 10:07:57 +00:00
|
|
|
// The deadzone radius of the tilt. Only used in the analog mapping.
|
2023-02-11 22:42:55 +00:00
|
|
|
float fTiltAnalogDeadzoneRadius;
|
2023-02-16 10:07:57 +00:00
|
|
|
// Type of tilt input currently selected: Defined in TiltEventProcessor.h
|
|
|
|
// 0 - no tilt, 1 - analog stick, 2 - D-Pad, 3 - Action Buttons (Tri, Cross, Square, Circle)
|
2013-11-11 11:52:04 +00:00
|
|
|
int iTiltInputType;
|
2012-11-20 09:59:23 +00:00
|
|
|
|
2013-08-18 20:30:34 +00:00
|
|
|
// The three tabs.
|
|
|
|
bool bGridView1;
|
|
|
|
bool bGridView2;
|
|
|
|
bool bGridView3;
|
|
|
|
|
2019-11-13 17:55:18 +00:00
|
|
|
// Right analog binding
|
|
|
|
int iRightAnalogUp;
|
|
|
|
int iRightAnalogDown;
|
|
|
|
int iRightAnalogLeft;
|
|
|
|
int iRightAnalogRight;
|
|
|
|
int iRightAnalogPress;
|
|
|
|
bool bRightAnalogCustom;
|
2021-08-07 10:47:50 +00:00
|
|
|
bool bRightAnalogDisableDiagonal;
|
2019-11-13 17:55:18 +00:00
|
|
|
|
2021-08-17 07:17:37 +00:00
|
|
|
// Motion gesture controller
|
|
|
|
bool bGestureControlEnabled;
|
|
|
|
int iSwipeUp;
|
|
|
|
int iSwipeDown;
|
|
|
|
int iSwipeLeft;
|
|
|
|
int iSwipeRight;
|
|
|
|
float fSwipeSensitivity;
|
|
|
|
float fSwipeSmoothing;
|
|
|
|
int iDoubleTapGesture;
|
|
|
|
|
2013-12-02 14:50:09 +00:00
|
|
|
// Disable diagonals
|
|
|
|
bool bDisableDpadDiagonals;
|
2015-02-28 22:02:03 +00:00
|
|
|
bool bGamepadOnlyFocused;
|
2013-12-10 22:19:37 +00:00
|
|
|
// Control Style
|
|
|
|
int iTouchButtonStyle;
|
2013-10-09 20:15:56 +00:00
|
|
|
int iTouchButtonOpacity;
|
2015-12-20 20:40:47 +00:00
|
|
|
int iTouchButtonHideSeconds;
|
2020-03-22 23:45:22 +00:00
|
|
|
// Auto rotation speed
|
|
|
|
float fAnalogAutoRotSpeed;
|
2019-12-18 23:41:32 +00:00
|
|
|
|
|
|
|
// Snap touch control position
|
|
|
|
bool bTouchSnapToGrid;
|
|
|
|
int iTouchSnapGridSize;
|
|
|
|
|
2015-03-05 09:58:25 +00:00
|
|
|
// Floating analog stick (recenters on thumb on press).
|
|
|
|
bool bAutoCenterTouchAnalog;
|
|
|
|
|
2013-10-09 20:15:56 +00:00
|
|
|
//space between PSP buttons
|
|
|
|
//the PSP button's center (triangle, circle, square, cross)
|
2018-06-17 05:14:41 +00:00
|
|
|
ConfigTouchPos touchActionButtonCenter;
|
2013-12-02 14:15:19 +00:00
|
|
|
float fActionButtonSpacing;
|
2013-10-09 20:15:56 +00:00
|
|
|
//radius of the D-pad (PSP cross)
|
2013-12-02 14:15:19 +00:00
|
|
|
// int iDpadRadius;
|
2013-10-09 20:15:56 +00:00
|
|
|
//the D-pad (PSP cross) position
|
2018-06-17 05:14:41 +00:00
|
|
|
ConfigTouchPos touchDpad;
|
2013-12-02 14:15:19 +00:00
|
|
|
float fDpadSpacing;
|
2018-06-17 05:14:41 +00:00
|
|
|
ConfigTouchPos touchStartKey;
|
|
|
|
ConfigTouchPos touchSelectKey;
|
2021-08-17 14:48:47 +00:00
|
|
|
ConfigTouchPos touchFastForwardKey;
|
2018-06-17 05:14:41 +00:00
|
|
|
ConfigTouchPos touchLKey;
|
|
|
|
ConfigTouchPos touchRKey;
|
|
|
|
ConfigTouchPos touchAnalogStick;
|
2019-07-18 01:16:46 +00:00
|
|
|
ConfigTouchPos touchRightAnalogStick;
|
2018-06-17 05:14:41 +00:00
|
|
|
|
2023-03-26 08:48:59 +00:00
|
|
|
ConfigTouchPos touchCustom0;
|
|
|
|
ConfigTouchPos touchCustom1;
|
|
|
|
ConfigTouchPos touchCustom2;
|
|
|
|
ConfigTouchPos touchCustom3;
|
|
|
|
ConfigTouchPos touchCustom4;
|
|
|
|
ConfigTouchPos touchCustom5;
|
|
|
|
ConfigTouchPos touchCustom6;
|
|
|
|
ConfigTouchPos touchCustom7;
|
|
|
|
ConfigTouchPos touchCustom8;
|
|
|
|
ConfigTouchPos touchCustom9;
|
2015-06-28 05:34:05 +00:00
|
|
|
|
2021-07-11 15:51:10 +00:00
|
|
|
float fLeftStickHeadScale;
|
|
|
|
float fRightStickHeadScale;
|
|
|
|
bool bHideStickBackground;
|
|
|
|
|
2013-10-20 10:06:01 +00:00
|
|
|
// Controls Visibility
|
|
|
|
bool bShowTouchControls;
|
|
|
|
|
|
|
|
bool bShowTouchCircle;
|
|
|
|
bool bShowTouchCross;
|
|
|
|
bool bShowTouchTriangle;
|
|
|
|
bool bShowTouchSquare;
|
|
|
|
|
2023-03-26 09:21:34 +00:00
|
|
|
ConfigCustomButton CustomButton0;
|
|
|
|
ConfigCustomButton CustomButton1;
|
|
|
|
ConfigCustomButton CustomButton2;
|
|
|
|
ConfigCustomButton CustomButton3;
|
|
|
|
ConfigCustomButton CustomButton4;
|
|
|
|
ConfigCustomButton CustomButton5;
|
|
|
|
ConfigCustomButton CustomButton6;
|
|
|
|
ConfigCustomButton CustomButton7;
|
|
|
|
ConfigCustomButton CustomButton8;
|
|
|
|
ConfigCustomButton CustomButton9;
|
2020-02-12 14:48:49 +00:00
|
|
|
|
2017-04-13 05:02:50 +00:00
|
|
|
// Ignored on iOS and other platforms that lack pause.
|
2014-02-25 06:39:10 +00:00
|
|
|
bool bShowTouchPause;
|
|
|
|
|
2013-10-20 10:06:01 +00:00
|
|
|
bool bHapticFeedback;
|
|
|
|
|
2017-05-10 12:26:35 +00:00
|
|
|
// We also use the XInput settings as analog settings on other platforms like Android.
|
2021-06-27 03:16:52 +00:00
|
|
|
float fAnalogDeadzone;
|
|
|
|
float fAnalogInverseDeadzone;
|
|
|
|
float fAnalogSensitivity;
|
|
|
|
// convert analog stick circle to square
|
|
|
|
bool bAnalogIsCircular;
|
|
|
|
|
2015-01-17 16:47:19 +00:00
|
|
|
|
2014-08-16 19:05:37 +00:00
|
|
|
float fAnalogLimiterDeadzone;
|
2013-07-27 21:21:48 +00:00
|
|
|
|
2017-04-26 14:48:55 +00:00
|
|
|
bool bMouseControl;
|
|
|
|
bool bMapMouse; // Workaround for mapping screen:|
|
2017-04-27 14:29:08 +00:00
|
|
|
bool bMouseConfine; // Trap inside the window.
|
2017-04-26 14:48:55 +00:00
|
|
|
float fMouseSensitivity;
|
|
|
|
float fMouseSmoothing;
|
|
|
|
|
2021-02-27 22:40:02 +00:00
|
|
|
bool bSystemControls;
|
|
|
|
|
2013-11-08 11:30:31 +00:00
|
|
|
// Risky JIT optimizations
|
|
|
|
bool bDiscardRegsOnJRRA;
|
|
|
|
|
2013-01-20 09:50:05 +00:00
|
|
|
// SystemParam
|
2013-04-19 18:59:24 +00:00
|
|
|
std::string sNickName;
|
2014-07-07 20:29:48 +00:00
|
|
|
std::string sMACAddress;
|
2013-09-16 22:08:09 +00:00
|
|
|
int iLanguage;
|
2013-06-19 05:08:29 +00:00
|
|
|
int iTimeFormat;
|
2013-04-19 18:59:24 +00:00
|
|
|
int iDateFormat;
|
|
|
|
int iTimeZone;
|
|
|
|
bool bDayLightSavings;
|
2013-06-19 05:08:29 +00:00
|
|
|
int iButtonPreference;
|
2013-04-20 16:01:03 +00:00
|
|
|
int iLockParentalLevel;
|
2013-01-28 23:11:02 +00:00
|
|
|
bool bEncryptSave;
|
2017-10-04 15:16:21 +00:00
|
|
|
bool bSavedataUpgrade;
|
2013-12-04 10:07:00 +00:00
|
|
|
|
|
|
|
// Networking
|
2020-01-17 19:32:09 +00:00
|
|
|
std::string proAdhocServer;
|
2013-12-04 10:07:00 +00:00
|
|
|
bool bEnableWlan;
|
2014-08-23 12:35:05 +00:00
|
|
|
bool bEnableAdhocServer;
|
2020-01-17 19:32:09 +00:00
|
|
|
bool bEnableUPnP;
|
2020-03-19 08:21:00 +00:00
|
|
|
bool bUPnPUseOriginalPort;
|
2020-10-07 18:38:43 +00:00
|
|
|
bool bForcedFirstConnect;
|
2020-01-17 19:32:09 +00:00
|
|
|
int iPortOffset;
|
|
|
|
int iMinTimeout;
|
2013-04-19 18:59:24 +00:00
|
|
|
int iWlanAdhocChannel;
|
|
|
|
bool bWlanPowerSave;
|
2016-10-21 12:40:11 +00:00
|
|
|
bool bEnableNetworkChat;
|
2016-12-05 03:04:31 +00:00
|
|
|
//for chat position , moveable buttons is better than this
|
|
|
|
int iChatButtonPosition;
|
|
|
|
int iChatScreenPosition;
|
2017-07-06 13:43:39 +00:00
|
|
|
|
|
|
|
bool bEnableQuickChat;
|
|
|
|
std::string sQuickChat0;
|
|
|
|
std::string sQuickChat1;
|
|
|
|
std::string sQuickChat2;
|
|
|
|
std::string sQuickChat3;
|
|
|
|
std::string sQuickChat4;
|
2013-12-04 10:07:00 +00:00
|
|
|
|
2013-11-28 17:35:15 +00:00
|
|
|
int iPSPModel;
|
2013-12-13 18:06:44 +00:00
|
|
|
int iFirmwareVersion;
|
2013-08-06 01:32:19 +00:00
|
|
|
bool bBypassOSKWithKeyboard;
|
2013-01-20 09:50:05 +00:00
|
|
|
|
2022-07-27 17:47:11 +00:00
|
|
|
// Virtual reality
|
|
|
|
bool bEnableVR;
|
2022-07-31 18:05:08 +00:00
|
|
|
bool bEnable6DoF;
|
2022-08-14 10:02:51 +00:00
|
|
|
bool bEnableStereo;
|
2022-10-31 11:17:30 +00:00
|
|
|
bool bEnableMotions;
|
2022-11-03 20:33:46 +00:00
|
|
|
bool bForce72Hz;
|
2023-02-07 18:48:16 +00:00
|
|
|
bool bManualForceVR;
|
2022-10-28 12:59:12 +00:00
|
|
|
float fCameraDistance;
|
2022-10-29 17:19:25 +00:00
|
|
|
float fCameraHeight;
|
2022-10-29 17:31:57 +00:00
|
|
|
float fCameraSide;
|
2022-10-28 12:59:12 +00:00
|
|
|
float fCanvasDistance;
|
|
|
|
float fFieldOfViewPercentage;
|
2022-11-25 14:58:51 +00:00
|
|
|
float fHeadUpDisplayScale;
|
2022-10-31 12:19:06 +00:00
|
|
|
float fMotionLength;
|
2023-01-28 09:33:51 +00:00
|
|
|
float fHeadRotationScale;
|
2023-03-09 10:22:54 +00:00
|
|
|
bool bHeadRotationEnabled;
|
2023-01-28 20:45:29 +00:00
|
|
|
bool bHeadRotationSmoothing;
|
2023-03-12 13:41:17 +00:00
|
|
|
int iCameraPitch;
|
2022-07-27 17:47:11 +00:00
|
|
|
|
2013-06-26 07:15:16 +00:00
|
|
|
// Debugger
|
|
|
|
int iDisasmWindowX;
|
|
|
|
int iDisasmWindowY;
|
|
|
|
int iDisasmWindowW;
|
|
|
|
int iDisasmWindowH;
|
2013-09-28 14:04:56 +00:00
|
|
|
int iGEWindowX;
|
|
|
|
int iGEWindowY;
|
|
|
|
int iGEWindowW;
|
|
|
|
int iGEWindowH;
|
2022-08-14 18:42:04 +00:00
|
|
|
uint32_t uGETabsLeft;
|
|
|
|
uint32_t uGETabsRight;
|
|
|
|
uint32_t uGETabsTopRight;
|
2013-06-26 07:32:49 +00:00
|
|
|
int iConsoleWindowX;
|
|
|
|
int iConsoleWindowY;
|
2013-07-09 09:17:57 +00:00
|
|
|
int iFontWidth;
|
|
|
|
int iFontHeight;
|
2013-07-30 15:06:37 +00:00
|
|
|
bool bDisplayStatusBar;
|
2013-09-30 19:42:05 +00:00
|
|
|
bool bShowBottomTabTitles;
|
2013-09-07 18:54:11 +00:00
|
|
|
bool bShowDeveloperMenu;
|
2018-01-17 12:59:32 +00:00
|
|
|
bool bShowAllocatorDebug;
|
2013-10-30 06:02:05 +00:00
|
|
|
// Double edged sword: much easier debugging, but not accurate.
|
|
|
|
bool bSkipDeadbeefFilling;
|
2013-12-06 08:11:49 +00:00
|
|
|
bool bFuncHashMap;
|
2021-03-14 22:10:35 +00:00
|
|
|
bool bDebugMemInfoDetailed;
|
2020-02-11 07:19:30 +00:00
|
|
|
bool bDrawFrameGraph;
|
2013-06-26 07:15:16 +00:00
|
|
|
|
2015-05-13 20:28:02 +00:00
|
|
|
// Volatile development settings
|
|
|
|
bool bShowFrameProfiler;
|
2021-12-19 21:49:42 +00:00
|
|
|
bool bGpuLogProfiler; // Controls the Vulkan logging profiler (profiles textures uploads etc).
|
2015-05-13 20:28:02 +00:00
|
|
|
|
2021-02-27 10:49:38 +00:00
|
|
|
// Various directories. Autoconfigured, not read from ini.
|
2021-05-29 22:20:41 +00:00
|
|
|
Path currentDirectory; // The directory selected in the game browsing window.
|
|
|
|
Path defaultCurrentDirectory; // Platform dependent, initialized at startup.
|
|
|
|
|
2021-05-05 23:31:38 +00:00
|
|
|
Path memStickDirectory;
|
|
|
|
Path flash0Directory;
|
2021-05-15 16:32:41 +00:00
|
|
|
Path internalDataDirectory;
|
|
|
|
Path appCacheDirectory;
|
2012-11-01 15:19:01 +00:00
|
|
|
|
2013-11-26 13:04:29 +00:00
|
|
|
// Data for upgrade prompt
|
|
|
|
std::string upgradeMessage; // The actual message from the server is currently not used, need a translation mechanism. So this just acts as a flag.
|
|
|
|
std::string upgradeVersion;
|
|
|
|
std::string dismissedVersion;
|
|
|
|
|
2014-12-14 19:33:20 +00:00
|
|
|
void Load(const char *iniFileName = nullptr, const char *controllerIniFilename = nullptr);
|
2021-07-25 13:33:11 +00:00
|
|
|
bool Save(const char *saveReason);
|
2020-03-08 22:25:20 +00:00
|
|
|
void Reload();
|
2023-01-31 17:56:18 +00:00
|
|
|
void RestoreDefaults(RestoreSettingsBits whatToRestore);
|
2016-08-27 18:38:05 +00:00
|
|
|
|
2014-12-14 19:33:20 +00:00
|
|
|
//per game config managment, should maybe be in it's own class
|
2019-07-14 22:04:09 +00:00
|
|
|
void changeGameSpecific(const std::string &gameId = "", const std::string &title = "");
|
2014-12-14 19:33:20 +00:00
|
|
|
bool createGameConfig(const std::string &game_id);
|
|
|
|
bool deleteGameConfig(const std::string& pGameId);
|
2019-07-18 04:28:21 +00:00
|
|
|
bool loadGameConfig(const std::string &game_id, const std::string &title);
|
2019-07-14 22:04:09 +00:00
|
|
|
bool saveGameConfig(const std::string &pGameId, const std::string &title);
|
2014-12-14 19:33:20 +00:00
|
|
|
void unloadGameConfig();
|
2021-05-05 23:31:38 +00:00
|
|
|
Path getGameConfigFile(const std::string &gameId);
|
2014-12-14 19:33:20 +00:00
|
|
|
bool hasGameConfig(const std::string &game_id);
|
2013-03-24 19:03:42 +00:00
|
|
|
|
2021-05-30 10:45:12 +00:00
|
|
|
void SetSearchPath(const Path &path);
|
2021-05-05 23:31:38 +00:00
|
|
|
const Path FindConfigFile(const std::string &baseFilename);
|
2013-10-12 23:02:03 +00:00
|
|
|
|
2021-05-29 20:55:43 +00:00
|
|
|
void UpdateIniLocation(const char *iniFileName = nullptr, const char *controllerIniFilename = nullptr);
|
|
|
|
|
2013-03-24 19:03:42 +00:00
|
|
|
// Utility functions for "recent" management
|
|
|
|
void AddRecent(const std::string &file);
|
2018-08-12 15:24:33 +00:00
|
|
|
void RemoveRecent(const std::string &file);
|
2013-04-13 19:24:07 +00:00
|
|
|
void CleanRecent();
|
2013-03-24 19:03:42 +00:00
|
|
|
|
2013-11-26 13:04:29 +00:00
|
|
|
static void DownloadCompletedCallback(http::Download &download);
|
|
|
|
void DismissUpgrade();
|
|
|
|
|
2013-12-12 13:52:46 +00:00
|
|
|
void ResetControlLayout();
|
|
|
|
|
2014-02-10 01:15:00 +00:00
|
|
|
void GetReportingInfo(UrlEncoder &data);
|
2015-05-15 16:04:05 +00:00
|
|
|
|
2018-06-17 01:42:31 +00:00
|
|
|
bool IsPortrait() const;
|
2018-09-01 20:57:20 +00:00
|
|
|
int NextValidBackend();
|
2019-06-22 18:48:36 +00:00
|
|
|
bool IsBackendEnabled(GPUBackend backend, bool validate = true);
|
2016-01-06 07:01:49 +00:00
|
|
|
|
2022-05-28 22:47:12 +00:00
|
|
|
bool UseFullScreen() const {
|
|
|
|
if (iForceFullScreen != -1)
|
|
|
|
return iForceFullScreen == 1;
|
|
|
|
return bFullScreen;
|
|
|
|
}
|
|
|
|
|
2022-07-12 05:01:06 +00:00
|
|
|
std::vector<std::string> RecentIsos() const;
|
|
|
|
bool HasRecentIsos() const;
|
|
|
|
void ClearRecentIsos();
|
2022-07-12 03:44:13 +00:00
|
|
|
|
2022-12-05 10:55:23 +00:00
|
|
|
const std::map<std::string, std::pair<std::string, int>> &GetLangValuesMapping();
|
2022-10-09 13:04:19 +00:00
|
|
|
bool LoadAppendedConfig();
|
|
|
|
void SetAppendedConfigIni(const Path &path);
|
2023-02-14 16:11:32 +00:00
|
|
|
void UpdateAfterSettingAutoFrameSkip();
|
2023-02-28 14:58:30 +00:00
|
|
|
void NotifyUpdatedCpuCore();
|
2016-01-06 07:01:49 +00:00
|
|
|
protected:
|
|
|
|
void LoadStandardControllerIni();
|
2022-12-05 10:55:23 +00:00
|
|
|
void LoadLangValuesMapping();
|
2016-08-27 18:38:05 +00:00
|
|
|
|
2022-12-17 16:54:31 +00:00
|
|
|
void PostLoadCleanup(bool gameSpecific);
|
|
|
|
void PreSaveCleanup(bool gameSpecific);
|
|
|
|
void PostSaveCleanup(bool gameSpecific);
|
|
|
|
|
2012-11-01 15:19:01 +00:00
|
|
|
private:
|
2020-03-08 22:25:20 +00:00
|
|
|
bool reload_ = false;
|
2014-12-30 18:05:36 +00:00
|
|
|
std::string gameId_;
|
2019-07-14 22:04:09 +00:00
|
|
|
std::string gameIdTitle_;
|
2022-07-12 03:44:13 +00:00
|
|
|
std::vector<std::string> recentIsos;
|
2022-12-05 10:55:23 +00:00
|
|
|
std::map<std::string, std::pair<std::string, int>> langValuesMapping_;
|
2021-05-05 23:31:38 +00:00
|
|
|
Path iniFilename_;
|
|
|
|
Path controllerIniFilename_;
|
2021-05-30 10:45:12 +00:00
|
|
|
Path searchPath_;
|
2022-10-09 13:04:19 +00:00
|
|
|
Path appendedConfigFileName_;
|
|
|
|
// A set make more sense, but won't have many entry, and I dont want to include the whole std::set header here
|
|
|
|
std::vector<std::string> appendedConfigUpdatedGames_;
|
2022-07-12 06:46:09 +00:00
|
|
|
ConfigPrivate *private_ = nullptr;
|
2012-11-01 15:19:01 +00:00
|
|
|
};
|
|
|
|
|
2017-04-29 19:48:06 +00:00
|
|
|
std::string CreateRandMAC();
|
2014-01-03 18:04:43 +00:00
|
|
|
|
2013-11-26 13:04:29 +00:00
|
|
|
// TODO: Find a better place for this.
|
|
|
|
extern http::Downloader g_DownloadManager;
|
2013-03-24 19:03:42 +00:00
|
|
|
extern Config g_Config;
|
2013-11-26 13:04:29 +00:00
|
|
|
|