2015-05-24 06:55:12 +02:00
|
|
|
// Copyright 2008 Dolphin Emulator Project
|
2015-05-18 01:08:10 +02:00
|
|
|
// Licensed under GPLv2+
|
2013-04-17 22:43:11 -04:00
|
|
|
// Refer to the license.txt file included.
|
2008-12-08 04:46:09 +00:00
|
|
|
|
2014-02-10 13:54:46 -05:00
|
|
|
#pragma once
|
2008-12-08 04:46:09 +00:00
|
|
|
|
2016-08-14 19:54:01 +00:00
|
|
|
#include <limits>
|
2017-06-04 10:33:14 +02:00
|
|
|
#include <optional>
|
2016-11-11 01:33:52 +01:00
|
|
|
#include <set>
|
2008-12-08 04:46:09 +00:00
|
|
|
#include <string>
|
2016-11-11 01:33:52 +01:00
|
|
|
#include <utility>
|
2008-12-08 04:46:09 +00:00
|
|
|
#include <vector>
|
|
|
|
|
2015-06-12 13:56:53 +02:00
|
|
|
#include "Common/IniFile.h"
|
2017-01-20 15:33:43 -05:00
|
|
|
#include "Core/HW/EXI/EXI_Device.h"
|
2017-01-20 18:45:11 -05:00
|
|
|
#include "Core/HW/SI/SI_Device.h"
|
2017-05-15 11:17:51 +02:00
|
|
|
#include "Core/TitleDatabase.h"
|
2016-07-06 20:33:05 +02:00
|
|
|
|
|
|
|
namespace DiscIO
|
|
|
|
{
|
|
|
|
enum class Language;
|
2016-12-23 21:53:36 +01:00
|
|
|
enum class Region;
|
2015-06-13 12:51:24 +02:00
|
|
|
struct Partition;
|
2017-06-06 11:49:01 +02:00
|
|
|
class Volume;
|
2017-03-09 09:47:43 +01:00
|
|
|
}
|
|
|
|
namespace IOS
|
|
|
|
{
|
|
|
|
namespace ES
|
|
|
|
{
|
|
|
|
class TMDReader;
|
|
|
|
}
|
2016-07-06 20:33:05 +02:00
|
|
|
}
|
2008-12-08 04:46:09 +00:00
|
|
|
|
2013-01-16 20:16:56 -05:00
|
|
|
// DSP Backend Types
|
2017-05-11 15:59:31 -07:00
|
|
|
#define BACKEND_NULLSOUND _trans("No Audio Output")
|
2016-06-24 10:43:46 +02:00
|
|
|
#define BACKEND_ALSA "ALSA"
|
2017-03-22 16:09:59 -07:00
|
|
|
#define BACKEND_CUBEB "Cubeb"
|
2016-06-24 10:43:46 +02:00
|
|
|
#define BACKEND_OPENAL "OpenAL"
|
|
|
|
#define BACKEND_PULSEAUDIO "Pulse"
|
|
|
|
#define BACKEND_XAUDIO2 "XAudio2"
|
|
|
|
#define BACKEND_OPENSLES "OpenSLES"
|
2015-06-12 13:56:53 +02:00
|
|
|
|
|
|
|
enum GPUDeterminismMode
|
|
|
|
{
|
2016-06-24 10:43:46 +02:00
|
|
|
GPU_DETERMINISM_AUTO,
|
|
|
|
GPU_DETERMINISM_NONE,
|
|
|
|
// This is currently the only mode. There will probably be at least
|
|
|
|
// one more at some point.
|
|
|
|
GPU_DETERMINISM_FAKE_COMPLETION,
|
2015-06-12 13:56:53 +02:00
|
|
|
};
|
|
|
|
|
2017-05-27 15:43:40 +02:00
|
|
|
struct BootParameters;
|
|
|
|
|
Remove NonCopyable
The class NonCopyable is, like the name says, supposed to disallow
copying. But should it allow moving?
For a long time, NonCopyable used to not allow moving. (It declared
a deleted copy constructor and assigment operator without declaring
a move constructor and assignment operator, making the compiler
implicitly delete the move constructor and assignment operator.)
That's fine if the classes that inherit from NonCopyable don't need
to be movable or if writing the move constructor and assignment
operator by hand is fine, but that's not the case for all classes,
as I discovered when I was working on the DirectoryBlob PR.
Because of that, I decided to make NonCopyable movable in c7602cc,
allowing me to use NonCopyable in DirectoryBlob.h. That was however
an unfortunate decision, because some of the classes that inherit
from NonCopyable have incorrect behavior when moved by default-
generated move constructors and assignment operators, and do not
explicitly delete the move constructors and assignment operators,
relying on NonCopyable being non-movable.
So what can we do about this? There are four solutions that I can
think of:
1. Make NonCopyable non-movable and tell DirectoryBlob to suck it.
2. Keep allowing moving NonCopyable, and expect that classes that
don't support moving will delete the move constructor and
assignment operator manually. Not only is this inconsistent
(having classes disallow copying one way and disallow moving
another way), but deleting the move constructor and assignment
operator manually is too easy to forget compared to how tricky
the resulting problems are.
3. Have one "MovableNonCopyable" and one "NonMovableNonCopyable".
It works, but it feels rather silly...
4. Don't have a NonCopyable class at all. Considering that deleting
the copy constructor and assignment operator only takes two lines
of code, I don't see much of a reason to keep NonCopyable. I
suppose that there was more of a point in having NonCopyable back
in the pre-C++11 days, when it wasn't possible to use "= delete".
I decided to go with the fourth one (like the commit title says).
The implementation of the commit is fairly straight-forward, though
I would like to point out that I skipped adding "= delete" lines
for classes whose only reason for being uncopyable is that they
contain uncopyable classes like File::IOFile and std::unique_ptr,
because the compiler makes such classes uncopyable automatically.
2017-08-04 23:57:12 +02:00
|
|
|
struct SConfig
|
2008-12-08 04:46:09 +00:00
|
|
|
{
|
2016-06-24 10:43:46 +02:00
|
|
|
// Wii Devices
|
|
|
|
bool m_WiiSDCard;
|
|
|
|
bool m_WiiKeyboard;
|
|
|
|
bool m_WiimoteContinuousScanning;
|
|
|
|
bool m_WiimoteEnableSpeaker;
|
|
|
|
|
|
|
|
// ISO folder
|
|
|
|
std::vector<std::string> m_ISOFolder;
|
|
|
|
bool m_RecursiveISOFolder;
|
|
|
|
|
|
|
|
// Settings
|
2016-09-25 19:20:02 +02:00
|
|
|
bool bEnableDebugging = false;
|
2016-06-24 10:43:46 +02:00
|
|
|
#ifdef USE_GDBSTUB
|
|
|
|
int iGDBPort;
|
|
|
|
#ifndef _WIN32
|
|
|
|
std::string gdb_socket;
|
|
|
|
#endif
|
|
|
|
#endif
|
2016-09-25 19:20:02 +02:00
|
|
|
bool bAutomaticStart = false;
|
|
|
|
bool bBootToPause = false;
|
2016-06-24 10:43:46 +02:00
|
|
|
|
2017-05-19 16:57:31 +02:00
|
|
|
int iCPUCore; // Uses the values of PowerPC::CPUCore
|
2016-06-24 10:43:46 +02:00
|
|
|
|
2016-09-25 19:20:02 +02:00
|
|
|
bool bJITNoBlockCache = false;
|
|
|
|
bool bJITNoBlockLinking = false;
|
|
|
|
bool bJITOff = false;
|
|
|
|
bool bJITLoadStoreOff = false;
|
|
|
|
bool bJITLoadStorelXzOff = false;
|
|
|
|
bool bJITLoadStorelwzOff = false;
|
|
|
|
bool bJITLoadStorelbzxOff = false;
|
|
|
|
bool bJITLoadStoreFloatingOff = false;
|
|
|
|
bool bJITLoadStorePairedOff = false;
|
|
|
|
bool bJITFloatingPointOff = false;
|
|
|
|
bool bJITIntegerOff = false;
|
|
|
|
bool bJITPairedOff = false;
|
|
|
|
bool bJITSystemRegistersOff = false;
|
|
|
|
bool bJITBranchOff = false;
|
2016-06-24 10:43:46 +02:00
|
|
|
|
|
|
|
bool bFastmem;
|
2016-09-25 19:20:02 +02:00
|
|
|
bool bFPRF = false;
|
|
|
|
bool bAccurateNaNs = false;
|
|
|
|
|
|
|
|
int iTimingVariance = 40; // in milli secounds
|
|
|
|
bool bCPUThread = true;
|
|
|
|
bool bDSPThread = false;
|
|
|
|
bool bDSPHLE = true;
|
|
|
|
bool bSyncGPUOnSkipIdleHack = true;
|
|
|
|
bool bHLE_BS2 = true;
|
|
|
|
bool bEnableCheats = false;
|
|
|
|
bool bEnableMemcardSdWriting = true;
|
2016-12-23 20:37:23 -05:00
|
|
|
bool bCopyWiiSaveNetplay = true;
|
2016-09-25 19:20:02 +02:00
|
|
|
|
|
|
|
bool bDPL2Decoder = false;
|
2017-06-17 07:43:37 -03:00
|
|
|
int iLatency = 20;
|
2017-04-10 17:56:24 +01:00
|
|
|
bool m_audio_stretch = false;
|
|
|
|
int m_audio_stretch_max_latency = 80;
|
2016-09-25 19:20:02 +02:00
|
|
|
|
|
|
|
bool bRunCompareServer = false;
|
|
|
|
bool bRunCompareClient = false;
|
|
|
|
|
|
|
|
bool bMMU = false;
|
|
|
|
bool bDCBZOFF = false;
|
2017-01-26 04:57:03 -05:00
|
|
|
bool bLowDCBZHack = false;
|
2016-09-25 19:20:02 +02:00
|
|
|
int iBBDumpPort = 0;
|
|
|
|
bool bFastDiscSpeed = false;
|
|
|
|
|
|
|
|
bool bSyncGPU = false;
|
2016-06-24 10:43:46 +02:00
|
|
|
int iSyncGpuMaxDistance;
|
|
|
|
int iSyncGpuMinDistance;
|
|
|
|
float fSyncGpuOverclock;
|
|
|
|
|
2016-09-25 19:20:02 +02:00
|
|
|
int SelectedLanguage = 0;
|
|
|
|
bool bOverrideGCLanguage = false;
|
2016-06-24 10:43:46 +02:00
|
|
|
|
2016-09-25 19:20:02 +02:00
|
|
|
bool bWii = false;
|
2017-05-27 12:32:45 +02:00
|
|
|
bool m_is_mios = false;
|
2016-06-24 10:43:46 +02:00
|
|
|
|
|
|
|
// Interface settings
|
2016-09-25 19:20:02 +02:00
|
|
|
bool bConfirmStop = false;
|
2017-05-31 23:16:47 -07:00
|
|
|
bool bHideCursor = false;
|
2016-09-25 19:20:02 +02:00
|
|
|
bool bUsePanicHandlers = true;
|
|
|
|
bool bOnScreenDisplayMessages = true;
|
2016-06-24 10:43:46 +02:00
|
|
|
std::string theme_name;
|
|
|
|
|
|
|
|
// Display settings
|
|
|
|
std::string strFullscreenResolution;
|
2016-08-14 19:54:01 +00:00
|
|
|
int iRenderWindowXPos = std::numeric_limits<int>::min();
|
|
|
|
int iRenderWindowYPos = std::numeric_limits<int>::min();
|
|
|
|
int iRenderWindowWidth = -1;
|
|
|
|
int iRenderWindowHeight = -1;
|
2016-09-25 19:20:02 +02:00
|
|
|
bool bRenderWindowAutoSize = false, bKeepWindowOnTop = false;
|
|
|
|
bool bFullscreen = false, bRenderToMain = false;
|
|
|
|
bool bDisableScreenSaver = false;
|
2016-06-24 10:43:46 +02:00
|
|
|
|
|
|
|
int iPosX, iPosY, iWidth, iHeight;
|
|
|
|
|
|
|
|
// Analytics settings.
|
|
|
|
std::string m_analytics_id;
|
2016-09-25 19:20:02 +02:00
|
|
|
bool m_analytics_enabled = false;
|
|
|
|
bool m_analytics_permission_asked = false;
|
2016-06-24 10:43:46 +02:00
|
|
|
|
2016-08-23 16:19:30 +02:00
|
|
|
// Bluetooth passthrough mode settings
|
|
|
|
bool m_bt_passthrough_enabled = false;
|
|
|
|
int m_bt_passthrough_pid = -1;
|
|
|
|
int m_bt_passthrough_vid = -1;
|
2016-09-16 23:25:57 +02:00
|
|
|
std::string m_bt_passthrough_link_keys;
|
2016-08-23 16:19:30 +02:00
|
|
|
|
2016-11-11 01:33:52 +01:00
|
|
|
// USB passthrough settings
|
|
|
|
std::set<std::pair<u16, u16>> m_usb_passthrough_devices;
|
|
|
|
bool IsUSBDeviceWhitelisted(std::pair<u16, u16> vid_pid) const;
|
|
|
|
|
2017-06-11 15:00:33 +02:00
|
|
|
bool m_enable_signature_checks = true;
|
|
|
|
|
2016-06-24 10:43:46 +02:00
|
|
|
// Fifo Player related settings
|
2016-09-25 19:20:02 +02:00
|
|
|
bool bLoopFifoReplay = true;
|
2016-06-24 10:43:46 +02:00
|
|
|
|
2016-07-13 16:46:14 -04:00
|
|
|
// Custom RTC
|
|
|
|
bool bEnableCustomRTC;
|
|
|
|
u32 m_customRTCValue;
|
|
|
|
|
2016-12-23 21:53:36 +01:00
|
|
|
DiscIO::Region m_region;
|
2016-06-24 10:43:46 +02:00
|
|
|
|
|
|
|
std::string m_strVideoBackend;
|
|
|
|
std::string m_strGPUDeterminismMode;
|
|
|
|
|
|
|
|
// set based on the string version
|
|
|
|
GPUDeterminismMode m_GPUDeterminismMode;
|
|
|
|
|
|
|
|
// files
|
|
|
|
std::string m_strBootROM;
|
|
|
|
std::string m_strSRAM;
|
|
|
|
std::string m_strDefaultISO;
|
2016-07-27 09:32:27 +02:00
|
|
|
std::string m_strWiiSDCardPath;
|
2016-06-24 10:43:46 +02:00
|
|
|
|
|
|
|
std::string m_perfDir;
|
|
|
|
|
2017-06-05 13:55:54 +02:00
|
|
|
std::string m_debugger_game_id;
|
2017-05-27 15:43:40 +02:00
|
|
|
// TODO: remove this as soon as the ticket view hack in IOS/ES/Views is dropped.
|
|
|
|
bool m_disc_booted_from_game_list = false;
|
|
|
|
|
2017-03-09 09:47:43 +01:00
|
|
|
const std::string& GetGameID() const { return m_game_id; }
|
2017-05-15 11:17:51 +02:00
|
|
|
const std::string& GetTitleDescription() const { return m_title_description; }
|
2017-03-09 09:47:43 +01:00
|
|
|
u64 GetTitleID() const { return m_title_id; }
|
|
|
|
u16 GetRevision() const { return m_revision; }
|
|
|
|
void ResetRunningGameMetadata();
|
2017-06-06 11:49:01 +02:00
|
|
|
void SetRunningGameMetadata(const DiscIO::Volume& volume, const DiscIO::Partition& partition);
|
2017-03-09 09:47:43 +01:00
|
|
|
void SetRunningGameMetadata(const IOS::ES::TMDReader& tmd);
|
|
|
|
|
2016-06-24 10:43:46 +02:00
|
|
|
void LoadDefaults();
|
2017-07-16 16:31:12 +02:00
|
|
|
// Replaces NTSC-K with some other region, and doesn't replace non-NTSC-K regions
|
|
|
|
static DiscIO::Region ToGameCubeRegion(DiscIO::Region region);
|
|
|
|
// The region argument must be valid for GameCube (i.e. must not be NTSC-K)
|
2016-12-23 21:53:36 +01:00
|
|
|
static const char* GetDirectoryForRegion(DiscIO::Region region);
|
2017-05-21 22:21:34 +01:00
|
|
|
std::string GetBootROMPath(const std::string& region_directory) const;
|
2017-05-27 15:43:40 +02:00
|
|
|
bool SetPathsAndGameMetadata(const BootParameters& boot);
|
2016-06-24 10:43:46 +02:00
|
|
|
void CheckMemcardPath(std::string& memcardPath, const std::string& gameRegion, bool isSlotA);
|
2016-07-06 20:33:05 +02:00
|
|
|
DiscIO::Language GetCurrentLanguage(bool wii) const;
|
2016-06-24 10:43:46 +02:00
|
|
|
|
|
|
|
IniFile LoadDefaultGameIni() const;
|
|
|
|
IniFile LoadLocalGameIni() const;
|
|
|
|
IniFile LoadGameIni() const;
|
|
|
|
|
2017-06-04 10:33:14 +02:00
|
|
|
static IniFile LoadDefaultGameIni(const std::string& id, std::optional<u16> revision);
|
|
|
|
static IniFile LoadLocalGameIni(const std::string& id, std::optional<u16> revision);
|
|
|
|
static IniFile LoadGameIni(const std::string& id, std::optional<u16> revision);
|
2016-06-24 10:43:46 +02:00
|
|
|
|
|
|
|
std::string m_NANDPath;
|
2016-06-25 11:24:43 -04:00
|
|
|
std::string m_DumpPath;
|
2016-06-24 10:43:46 +02:00
|
|
|
|
|
|
|
std::string m_strMemoryCardA;
|
|
|
|
std::string m_strMemoryCardB;
|
|
|
|
std::string m_strGbaCartA;
|
|
|
|
std::string m_strGbaCartB;
|
2017-03-18 17:46:05 -04:00
|
|
|
ExpansionInterface::TEXIDevices m_EXIDevice[3];
|
2017-03-16 04:41:36 -04:00
|
|
|
SerialInterface::SIDevices m_SIDevice[4];
|
2016-06-24 10:43:46 +02:00
|
|
|
std::string m_bba_mac;
|
|
|
|
|
|
|
|
// interface language
|
2016-08-12 14:01:09 +02:00
|
|
|
std::string m_InterfaceLanguage;
|
2016-06-24 10:43:46 +02:00
|
|
|
float m_EmulationSpeed;
|
|
|
|
bool m_OCEnable;
|
|
|
|
float m_OCFactor;
|
|
|
|
// other interface settings
|
|
|
|
bool m_InterfaceToolbar;
|
|
|
|
bool m_InterfaceStatusbar;
|
|
|
|
bool m_InterfaceLogWindow;
|
|
|
|
bool m_InterfaceLogConfigWindow;
|
|
|
|
bool m_InterfaceExtendedFPSInfo;
|
2017-05-15 11:17:51 +02:00
|
|
|
bool m_show_active_title = false;
|
2017-07-10 10:16:06 +02:00
|
|
|
bool m_use_builtin_title_database = true;
|
2016-06-24 10:43:46 +02:00
|
|
|
|
|
|
|
bool m_ListDrives;
|
|
|
|
bool m_ListWad;
|
|
|
|
bool m_ListElfDol;
|
|
|
|
bool m_ListWii;
|
|
|
|
bool m_ListGC;
|
|
|
|
bool m_ListPal;
|
|
|
|
bool m_ListUsa;
|
|
|
|
bool m_ListJap;
|
|
|
|
bool m_ListAustralia;
|
|
|
|
bool m_ListFrance;
|
|
|
|
bool m_ListGermany;
|
|
|
|
bool m_ListItaly;
|
|
|
|
bool m_ListKorea;
|
|
|
|
bool m_ListNetherlands;
|
|
|
|
bool m_ListRussia;
|
|
|
|
bool m_ListSpain;
|
|
|
|
bool m_ListTaiwan;
|
|
|
|
bool m_ListWorld;
|
|
|
|
bool m_ListUnknown;
|
|
|
|
int m_ListSort;
|
|
|
|
int m_ListSort2;
|
|
|
|
|
|
|
|
// Game list column toggles
|
|
|
|
bool m_showSystemColumn;
|
|
|
|
bool m_showBannerColumn;
|
2017-05-08 19:03:59 +02:00
|
|
|
bool m_showDescriptionColumn;
|
2017-04-17 19:34:14 +02:00
|
|
|
bool m_showTitleColumn;
|
2016-06-24 10:43:46 +02:00
|
|
|
bool m_showMakerColumn;
|
|
|
|
bool m_showFileNameColumn;
|
|
|
|
bool m_showIDColumn;
|
|
|
|
bool m_showRegionColumn;
|
|
|
|
bool m_showSizeColumn;
|
|
|
|
|
|
|
|
std::string m_WirelessMac;
|
|
|
|
bool m_PauseMovie;
|
|
|
|
bool m_ShowLag;
|
|
|
|
bool m_ShowFrameCount;
|
2016-07-19 20:23:25 -04:00
|
|
|
bool m_ShowRTC;
|
2016-06-24 10:43:46 +02:00
|
|
|
std::string m_strMovieAuthor;
|
|
|
|
unsigned int m_FrameSkip;
|
|
|
|
bool m_DumpFrames;
|
|
|
|
bool m_DumpFramesSilent;
|
|
|
|
bool m_ShowInputDisplay;
|
|
|
|
|
|
|
|
bool m_PauseOnFocusLost;
|
|
|
|
|
2016-12-07 13:20:37 -05:00
|
|
|
bool m_DisableTooltips;
|
|
|
|
|
2016-06-24 10:43:46 +02:00
|
|
|
// DSP settings
|
|
|
|
bool m_DSPEnableJIT;
|
|
|
|
bool m_DSPCaptureLog;
|
|
|
|
bool m_DumpAudio;
|
2017-01-08 13:51:00 -05:00
|
|
|
bool m_DumpAudioSilent;
|
2016-06-24 10:43:46 +02:00
|
|
|
bool m_IsMuted;
|
|
|
|
bool m_DumpUCode;
|
|
|
|
int m_Volume;
|
|
|
|
std::string sBackend;
|
|
|
|
|
|
|
|
// Input settings
|
|
|
|
bool m_BackgroundInput;
|
|
|
|
bool m_AdapterRumble[4];
|
|
|
|
bool m_AdapterKonga[4];
|
|
|
|
|
2015-06-16 21:48:09 +02:00
|
|
|
// Network settings
|
|
|
|
bool m_SSLDumpRead;
|
|
|
|
bool m_SSLDumpWrite;
|
2015-06-09 20:23:56 +02:00
|
|
|
bool m_SSLVerifyCert;
|
2015-07-11 10:31:03 +02:00
|
|
|
bool m_SSLDumpRootCA;
|
|
|
|
bool m_SSLDumpPeerCert;
|
2015-06-16 21:48:09 +02:00
|
|
|
|
2018-03-17 17:22:05 -07:00
|
|
|
// Auto-update settings
|
|
|
|
std::string m_auto_update_track;
|
|
|
|
std::string m_auto_update_hash_override;
|
|
|
|
|
Remove NonCopyable
The class NonCopyable is, like the name says, supposed to disallow
copying. But should it allow moving?
For a long time, NonCopyable used to not allow moving. (It declared
a deleted copy constructor and assigment operator without declaring
a move constructor and assignment operator, making the compiler
implicitly delete the move constructor and assignment operator.)
That's fine if the classes that inherit from NonCopyable don't need
to be movable or if writing the move constructor and assignment
operator by hand is fine, but that's not the case for all classes,
as I discovered when I was working on the DirectoryBlob PR.
Because of that, I decided to make NonCopyable movable in c7602cc,
allowing me to use NonCopyable in DirectoryBlob.h. That was however
an unfortunate decision, because some of the classes that inherit
from NonCopyable have incorrect behavior when moved by default-
generated move constructors and assignment operators, and do not
explicitly delete the move constructors and assignment operators,
relying on NonCopyable being non-movable.
So what can we do about this? There are four solutions that I can
think of:
1. Make NonCopyable non-movable and tell DirectoryBlob to suck it.
2. Keep allowing moving NonCopyable, and expect that classes that
don't support moving will delete the move constructor and
assignment operator manually. Not only is this inconsistent
(having classes disallow copying one way and disallow moving
another way), but deleting the move constructor and assignment
operator manually is too easy to forget compared to how tricky
the resulting problems are.
3. Have one "MovableNonCopyable" and one "NonMovableNonCopyable".
It works, but it feels rather silly...
4. Don't have a NonCopyable class at all. Considering that deleting
the copy constructor and assignment operator only takes two lines
of code, I don't see much of a reason to keep NonCopyable. I
suppose that there was more of a point in having NonCopyable back
in the pre-C++11 days, when it wasn't possible to use "= delete".
I decided to go with the fourth one (like the commit title says).
The implementation of the commit is fairly straight-forward, though
I would like to point out that I skipped adding "= delete" lines
for classes whose only reason for being uncopyable is that they
contain uncopyable classes like File::IOFile and std::unique_ptr,
because the compiler makes such classes uncopyable automatically.
2017-08-04 23:57:12 +02:00
|
|
|
SConfig(const SConfig&) = delete;
|
|
|
|
SConfig& operator=(const SConfig&) = delete;
|
|
|
|
SConfig(SConfig&&) = delete;
|
|
|
|
SConfig& operator=(SConfig&&) = delete;
|
|
|
|
|
2016-06-24 10:43:46 +02:00
|
|
|
// Save settings
|
|
|
|
void SaveSettings();
|
|
|
|
|
|
|
|
// Load settings
|
|
|
|
void LoadSettings();
|
|
|
|
|
|
|
|
// Return the permanent and somewhat globally used instance of this struct
|
|
|
|
static SConfig& GetInstance() { return (*m_Instance); }
|
|
|
|
static void Init();
|
|
|
|
static void Shutdown();
|
2010-02-16 04:34:41 +00:00
|
|
|
|
2010-02-19 18:50:01 +00:00
|
|
|
private:
|
2016-06-24 10:43:46 +02:00
|
|
|
SConfig();
|
|
|
|
~SConfig();
|
|
|
|
|
|
|
|
void SaveGeneralSettings(IniFile& ini);
|
|
|
|
void SaveInterfaceSettings(IniFile& ini);
|
|
|
|
void SaveDisplaySettings(IniFile& ini);
|
|
|
|
void SaveGameListSettings(IniFile& ini);
|
|
|
|
void SaveCoreSettings(IniFile& ini);
|
|
|
|
void SaveDSPSettings(IniFile& ini);
|
|
|
|
void SaveInputSettings(IniFile& ini);
|
|
|
|
void SaveMovieSettings(IniFile& ini);
|
|
|
|
void SaveFifoPlayerSettings(IniFile& ini);
|
2015-06-16 21:48:09 +02:00
|
|
|
void SaveNetworkSettings(IniFile& ini);
|
2016-06-24 10:43:46 +02:00
|
|
|
void SaveAnalyticsSettings(IniFile& ini);
|
2016-08-23 16:19:30 +02:00
|
|
|
void SaveBluetoothPassthroughSettings(IniFile& ini);
|
2016-11-11 01:33:52 +01:00
|
|
|
void SaveUSBPassthroughSettings(IniFile& ini);
|
2018-03-17 17:22:05 -07:00
|
|
|
void SaveAutoUpdateSettings(IniFile& ini);
|
2016-06-24 10:43:46 +02:00
|
|
|
|
|
|
|
void LoadGeneralSettings(IniFile& ini);
|
|
|
|
void LoadInterfaceSettings(IniFile& ini);
|
|
|
|
void LoadDisplaySettings(IniFile& ini);
|
|
|
|
void LoadGameListSettings(IniFile& ini);
|
|
|
|
void LoadCoreSettings(IniFile& ini);
|
|
|
|
void LoadDSPSettings(IniFile& ini);
|
|
|
|
void LoadInputSettings(IniFile& ini);
|
|
|
|
void LoadMovieSettings(IniFile& ini);
|
|
|
|
void LoadFifoPlayerSettings(IniFile& ini);
|
2015-06-16 21:48:09 +02:00
|
|
|
void LoadNetworkSettings(IniFile& ini);
|
2016-06-24 10:43:46 +02:00
|
|
|
void LoadAnalyticsSettings(IniFile& ini);
|
2016-08-23 16:19:30 +02:00
|
|
|
void LoadBluetoothPassthroughSettings(IniFile& ini);
|
2016-11-11 01:33:52 +01:00
|
|
|
void LoadUSBPassthroughSettings(IniFile& ini);
|
2018-03-17 17:22:05 -07:00
|
|
|
void LoadAutoUpdateSettings(IniFile& ini);
|
2016-06-24 10:43:46 +02:00
|
|
|
|
2017-05-15 11:17:51 +02:00
|
|
|
void SetRunningGameMetadata(const std::string& game_id, u64 title_id, u16 revision,
|
|
|
|
Core::TitleDatabase::TitleType type);
|
2017-01-25 14:42:11 +01:00
|
|
|
|
2016-06-24 10:43:46 +02:00
|
|
|
static SConfig* m_Instance;
|
2017-03-09 09:47:43 +01:00
|
|
|
|
|
|
|
std::string m_game_id;
|
2017-05-15 11:17:51 +02:00
|
|
|
std::string m_title_description;
|
2017-03-09 09:47:43 +01:00
|
|
|
u64 m_title_id;
|
|
|
|
u16 m_revision;
|
2008-12-08 04:46:09 +00:00
|
|
|
};
|