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
|
|
|
|
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
|
|
|
|
2015-06-12 13:56:53 +02:00
|
|
|
#include "Common/IniFile.h"
|
2014-02-17 05:18:15 -05:00
|
|
|
#include "Common/SysConf.h"
|
|
|
|
#include "Core/HW/EXI_Device.h"
|
|
|
|
#include "Core/HW/SI_Device.h"
|
2015-06-12 13:56:53 +02:00
|
|
|
#include "DiscIO/Volume.h"
|
2008-12-08 04:46:09 +00:00
|
|
|
|
2013-01-16 20:16:56 -05:00
|
|
|
// DSP Backend Types
|
2014-02-09 18:29:13 -05:00
|
|
|
#define BACKEND_NULLSOUND _trans("No audio output")
|
|
|
|
#define BACKEND_ALSA "ALSA"
|
|
|
|
#define BACKEND_AOSOUND "AOSound"
|
|
|
|
#define BACKEND_COREAUDIO "CoreAudio"
|
|
|
|
#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
|
|
|
|
{
|
|
|
|
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,
|
|
|
|
};
|
|
|
|
|
2010-11-15 05:29:10 +00:00
|
|
|
struct SConfig : NonCopyable
|
2008-12-08 04:46:09 +00:00
|
|
|
{
|
2010-01-11 11:56:17 +00:00
|
|
|
// Wii Devices
|
|
|
|
bool m_WiiSDCard;
|
|
|
|
bool m_WiiKeyboard;
|
2013-02-11 17:58:56 -06:00
|
|
|
bool m_WiimoteContinuousScanning;
|
2013-02-15 03:00:31 -06:00
|
|
|
bool m_WiimoteEnableSpeaker;
|
2010-01-11 11:56:17 +00:00
|
|
|
|
2008-12-08 04:46:09 +00:00
|
|
|
// name of the last used filename
|
|
|
|
std::string m_LastFilename;
|
|
|
|
|
2014-10-20 17:49:33 -04:00
|
|
|
// ISO folder
|
2009-04-08 20:26:33 +00:00
|
|
|
std::vector<std::string> m_ISOFolder;
|
|
|
|
bool m_RecursiveISOFolder;
|
2008-12-08 04:46:09 +00:00
|
|
|
|
2015-06-12 13:56:53 +02:00
|
|
|
// Settings
|
|
|
|
bool bEnableDebugging;
|
|
|
|
#ifdef USE_GDBSTUB
|
|
|
|
int iGDBPort;
|
|
|
|
#ifndef _WIN32
|
|
|
|
std::string gdb_socket;
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
bool bAutomaticStart;
|
|
|
|
bool bBootToPause;
|
|
|
|
|
|
|
|
int iCPUCore;
|
|
|
|
|
|
|
|
// JIT (shared between JIT and JITIL)
|
|
|
|
bool bJITNoBlockCache, bJITNoBlockLinking;
|
|
|
|
bool bJITOff;
|
|
|
|
bool bJITLoadStoreOff, bJITLoadStorelXzOff, bJITLoadStorelwzOff, bJITLoadStorelbzxOff;
|
|
|
|
bool bJITLoadStoreFloatingOff;
|
|
|
|
bool bJITLoadStorePairedOff;
|
|
|
|
bool bJITFloatingPointOff;
|
|
|
|
bool bJITIntegerOff;
|
|
|
|
bool bJITPairedOff;
|
|
|
|
bool bJITSystemRegistersOff;
|
|
|
|
bool bJITBranchOff;
|
|
|
|
bool bJITILTimeProfiling;
|
|
|
|
bool bJITILOutputIR;
|
|
|
|
|
|
|
|
bool bFastmem;
|
|
|
|
bool bFPRF;
|
|
|
|
bool bAccurateNaNs;
|
|
|
|
|
|
|
|
bool bCPUThread;
|
|
|
|
bool bDSPThread;
|
|
|
|
bool bDSPHLE;
|
|
|
|
bool bSkipIdle;
|
|
|
|
bool bSyncGPUOnSkipIdleHack;
|
|
|
|
bool bNTSC;
|
|
|
|
bool bForceNTSCJ;
|
|
|
|
bool bHLE_BS2;
|
|
|
|
bool bEnableCheats;
|
|
|
|
bool bEnableMemcardSaving;
|
|
|
|
|
|
|
|
bool bDPL2Decoder;
|
|
|
|
int iLatency;
|
|
|
|
|
|
|
|
bool bRunCompareServer;
|
|
|
|
bool bRunCompareClient;
|
|
|
|
|
|
|
|
bool bMMU;
|
|
|
|
bool bDCBZOFF;
|
|
|
|
int iBBDumpPort;
|
|
|
|
bool bFastDiscSpeed;
|
|
|
|
|
|
|
|
bool bSyncGPU;
|
|
|
|
int iSyncGpuMaxDistance;
|
|
|
|
int iSyncGpuMinDistance;
|
|
|
|
float fSyncGpuOverclock;
|
|
|
|
|
|
|
|
int SelectedLanguage;
|
|
|
|
bool bOverrideGCLanguage;
|
|
|
|
|
|
|
|
bool bWii;
|
|
|
|
|
|
|
|
// Interface settings
|
|
|
|
bool bConfirmStop, bHideCursor, bAutoHideCursor, bUsePanicHandlers, bOnScreenDisplayMessages;
|
|
|
|
std::string theme_name;
|
|
|
|
|
|
|
|
// Display settings
|
|
|
|
std::string strFullscreenResolution;
|
|
|
|
int iRenderWindowXPos, iRenderWindowYPos;
|
|
|
|
int iRenderWindowWidth, iRenderWindowHeight;
|
|
|
|
bool bRenderWindowAutoSize, bKeepWindowOnTop;
|
|
|
|
bool bFullscreen, bRenderToMain;
|
|
|
|
bool bProgressive, bDisableScreenSaver;
|
|
|
|
|
|
|
|
int iPosX, iPosY, iWidth, iHeight;
|
|
|
|
|
|
|
|
// Fifo Player related settings
|
|
|
|
bool bLoopFifoReplay;
|
|
|
|
|
|
|
|
enum EBootBS2
|
|
|
|
{
|
|
|
|
BOOT_DEFAULT,
|
|
|
|
BOOT_BS2_JAP,
|
|
|
|
BOOT_BS2_USA,
|
|
|
|
BOOT_BS2_EUR,
|
|
|
|
};
|
|
|
|
|
|
|
|
enum EBootType
|
|
|
|
{
|
|
|
|
BOOT_ISO,
|
|
|
|
BOOT_ELF,
|
|
|
|
BOOT_DOL,
|
|
|
|
BOOT_WII_NAND,
|
|
|
|
BOOT_BS2,
|
|
|
|
BOOT_DFF
|
|
|
|
};
|
|
|
|
EBootType m_BootType;
|
|
|
|
|
|
|
|
std::string m_strVideoBackend;
|
|
|
|
std::string m_strGPUDeterminismMode;
|
|
|
|
|
|
|
|
// set based on the string version
|
|
|
|
GPUDeterminismMode m_GPUDeterminismMode;
|
|
|
|
|
|
|
|
// files
|
|
|
|
std::string m_strFilename;
|
|
|
|
std::string m_strBootROM;
|
|
|
|
std::string m_strSRAM;
|
|
|
|
std::string m_strDefaultISO;
|
|
|
|
std::string m_strDVDRoot;
|
|
|
|
std::string m_strApploader;
|
|
|
|
std::string m_strUniqueID;
|
|
|
|
std::string m_strName;
|
|
|
|
u16 m_revision;
|
|
|
|
|
|
|
|
std::string m_perfDir;
|
|
|
|
|
|
|
|
void LoadDefaults();
|
|
|
|
bool AutoSetup(EBootBS2 _BootBS2);
|
|
|
|
const std::string &GetUniqueID() const { return m_strUniqueID; }
|
|
|
|
void CheckMemcardPath(std::string& memcardPath, const std::string& gameRegion, bool isSlotA);
|
|
|
|
DiscIO::IVolume::ELanguage GetCurrentLanguage(bool wii) const;
|
|
|
|
|
|
|
|
IniFile LoadDefaultGameIni() const;
|
|
|
|
IniFile LoadLocalGameIni() const;
|
|
|
|
IniFile LoadGameIni() const;
|
|
|
|
|
|
|
|
static IniFile LoadDefaultGameIni(const std::string& id, u16 revision);
|
|
|
|
static IniFile LoadLocalGameIni(const std::string& id, u16 revision);
|
|
|
|
static IniFile LoadGameIni(const std::string& id, u16 revision);
|
|
|
|
|
|
|
|
static std::vector<std::string> GetGameIniFilenames(const std::string& id, u16 revision);
|
|
|
|
|
2011-05-24 19:12:18 +00:00
|
|
|
std::string m_NANDPath;
|
2008-12-08 04:46:09 +00:00
|
|
|
|
2009-02-02 22:29:33 +00:00
|
|
|
std::string m_strMemoryCardA;
|
|
|
|
std::string m_strMemoryCardB;
|
2015-01-20 23:41:46 +11:00
|
|
|
std::string m_strGbaCartA;
|
|
|
|
std::string m_strGbaCartB;
|
2009-02-02 22:29:33 +00:00
|
|
|
TEXIDevices m_EXIDevice[3];
|
2011-10-23 07:01:17 -07:00
|
|
|
SIDevices m_SIDevice[4];
|
2010-12-27 22:30:24 +00:00
|
|
|
std::string m_bba_mac;
|
2009-02-02 22:29:33 +00:00
|
|
|
|
2009-01-22 07:42:17 +00:00
|
|
|
// interface language
|
2011-01-08 15:05:59 +00:00
|
|
|
int m_InterfaceLanguage;
|
2009-06-09 21:27:45 +00:00
|
|
|
// framelimit choose
|
2011-01-27 05:01:00 +00:00
|
|
|
unsigned int m_Framelimit;
|
2014-12-31 10:24:14 -08:00
|
|
|
bool m_OCEnable;
|
|
|
|
float m_OCFactor;
|
2009-03-18 17:17:58 +00:00
|
|
|
// other interface settings
|
|
|
|
bool m_InterfaceToolbar;
|
|
|
|
bool m_InterfaceStatusbar;
|
|
|
|
bool m_InterfaceLogWindow;
|
2011-02-21 15:01:00 +00:00
|
|
|
bool m_InterfaceLogConfigWindow;
|
2014-03-22 04:15:30 -05:00
|
|
|
bool m_InterfaceExtendedFPSInfo;
|
2010-01-11 05:07:56 +00:00
|
|
|
|
2009-04-28 02:30:50 +00:00
|
|
|
bool m_ListDrives;
|
2009-06-06 06:22:36 +00:00
|
|
|
bool m_ListWad;
|
2009-04-28 02:30:50 +00:00
|
|
|
bool m_ListWii;
|
|
|
|
bool m_ListGC;
|
|
|
|
bool m_ListPal;
|
|
|
|
bool m_ListUsa;
|
|
|
|
bool m_ListJap;
|
2014-10-30 10:35:46 -04:00
|
|
|
bool m_ListAustralia;
|
2010-01-11 05:07:56 +00:00
|
|
|
bool m_ListFrance;
|
2014-10-30 10:35:46 -04:00
|
|
|
bool m_ListGermany;
|
2010-01-11 05:07:56 +00:00
|
|
|
bool m_ListItaly;
|
|
|
|
bool m_ListKorea;
|
2014-10-30 10:35:46 -04:00
|
|
|
bool m_ListNetherlands;
|
|
|
|
bool m_ListRussia;
|
|
|
|
bool m_ListSpain;
|
2010-01-11 05:07:56 +00:00
|
|
|
bool m_ListTaiwan;
|
2015-04-08 18:55:16 -04:00
|
|
|
bool m_ListWorld;
|
2010-01-11 05:07:56 +00:00
|
|
|
bool m_ListUnknown;
|
2012-12-17 06:08:45 -05:00
|
|
|
int m_ListSort;
|
|
|
|
int m_ListSort2;
|
|
|
|
|
2014-06-04 09:54:48 -04:00
|
|
|
// Game list column toggles
|
|
|
|
bool m_showSystemColumn;
|
|
|
|
bool m_showBannerColumn;
|
2015-04-20 13:00:15 +02:00
|
|
|
bool m_showMakerColumn;
|
2014-06-04 09:54:48 -04:00
|
|
|
bool m_showIDColumn;
|
|
|
|
bool m_showRegionColumn;
|
|
|
|
bool m_showSizeColumn;
|
|
|
|
bool m_showStateColumn;
|
|
|
|
|
|
|
|
// Toggles whether compressed titles show up in blue in the game list
|
|
|
|
bool m_ColorCompressed;
|
|
|
|
|
2012-11-14 14:28:38 -05:00
|
|
|
std::string m_WirelessMac;
|
2012-11-14 16:21:54 -05:00
|
|
|
bool m_PauseMovie;
|
|
|
|
bool m_ShowLag;
|
2014-09-30 18:49:44 -04:00
|
|
|
bool m_ShowFrameCount;
|
2012-11-14 16:21:54 -05:00
|
|
|
std::string m_strMovieAuthor;
|
2014-02-18 12:12:49 -05:00
|
|
|
unsigned int m_FrameSkip;
|
2014-10-12 23:53:10 -04:00
|
|
|
bool m_DumpFrames;
|
2015-02-14 23:38:14 +01:00
|
|
|
bool m_DumpFramesSilent;
|
2014-10-17 21:08:34 -04:00
|
|
|
bool m_ShowInputDisplay;
|
2009-03-18 17:17:58 +00:00
|
|
|
|
2015-03-16 20:28:17 -07:00
|
|
|
bool m_PauseOnFocusLost;
|
|
|
|
|
2013-01-16 20:16:56 -05:00
|
|
|
// DSP settings
|
2014-02-23 15:14:27 +01:00
|
|
|
bool m_DSPEnableJIT;
|
2014-04-26 00:51:38 +02:00
|
|
|
bool m_DSPCaptureLog;
|
2013-01-16 20:16:56 -05:00
|
|
|
bool m_DumpAudio;
|
2014-12-28 22:03:21 +01:00
|
|
|
bool m_IsMuted;
|
2013-01-16 20:16:56 -05:00
|
|
|
int m_Volume;
|
|
|
|
std::string sBackend;
|
|
|
|
|
2014-07-11 10:42:44 -04:00
|
|
|
// Input settings
|
|
|
|
bool m_BackgroundInput;
|
2014-12-10 20:45:45 +11:00
|
|
|
bool m_GameCubeAdapter;
|
2015-04-27 00:42:12 +02:00
|
|
|
bool m_AdapterRumble;
|
2014-07-11 10:42:44 -04:00
|
|
|
|
2009-09-14 06:26:49 +00:00
|
|
|
SysConf* m_SYSCONF;
|
|
|
|
|
2014-11-13 21:28:27 -05:00
|
|
|
// Save settings
|
2008-12-08 04:46:09 +00:00
|
|
|
void SaveSettings();
|
|
|
|
|
2014-11-13 21:28:27 -05:00
|
|
|
// Load settings
|
2008-12-08 04:46:09 +00:00
|
|
|
void LoadSettings();
|
|
|
|
|
2010-02-06 05:22:53 +00:00
|
|
|
// Return the permanent and somewhat globally used instance of this struct
|
2015-02-15 14:43:31 -05:00
|
|
|
static SConfig& GetInstance() { return(*m_Instance); }
|
2008-12-08 04:46:09 +00:00
|
|
|
|
2010-02-16 04:34:41 +00:00
|
|
|
static void Init();
|
|
|
|
static void Shutdown();
|
|
|
|
|
2010-02-19 18:50:01 +00:00
|
|
|
private:
|
|
|
|
SConfig();
|
|
|
|
~SConfig();
|
2008-12-08 04:46:09 +00:00
|
|
|
|
2014-06-16 01:12:43 -04:00
|
|
|
void SaveGeneralSettings(IniFile& ini);
|
|
|
|
void SaveInterfaceSettings(IniFile& ini);
|
|
|
|
void SaveDisplaySettings(IniFile& ini);
|
|
|
|
void SaveGameListSettings(IniFile& ini);
|
|
|
|
void SaveCoreSettings(IniFile& ini);
|
|
|
|
void SaveDSPSettings(IniFile& ini);
|
2014-07-11 10:42:44 -04:00
|
|
|
void SaveInputSettings(IniFile& ini);
|
2014-06-16 01:12:43 -04:00
|
|
|
void SaveMovieSettings(IniFile& ini);
|
|
|
|
void SaveFifoPlayerSettings(IniFile& ini);
|
|
|
|
|
|
|
|
void LoadGeneralSettings(IniFile& ini);
|
|
|
|
void LoadInterfaceSettings(IniFile& ini);
|
|
|
|
void LoadDisplaySettings(IniFile& ini);
|
|
|
|
void LoadGameListSettings(IniFile& ini);
|
|
|
|
void LoadCoreSettings(IniFile& ini);
|
|
|
|
void LoadDSPSettings(IniFile& ini);
|
2014-07-11 10:42:44 -04:00
|
|
|
void LoadInputSettings(IniFile& ini);
|
2014-06-16 01:12:43 -04:00
|
|
|
void LoadMovieSettings(IniFile& ini);
|
|
|
|
void LoadFifoPlayerSettings(IniFile& ini);
|
|
|
|
|
2010-02-19 18:50:01 +00:00
|
|
|
static SConfig* m_Instance;
|
2008-12-08 04:46:09 +00:00
|
|
|
};
|