2010-09-24 02:48:03 +02:00
|
|
|
/****************************************************************************
|
2010-09-19 22:25:12 +02:00
|
|
|
* Copyright (C) 2010
|
|
|
|
* by Dimok
|
|
|
|
*
|
|
|
|
* This software is provided 'as-is', without any express or implied
|
|
|
|
* warranty. In no event will the authors be held liable for any
|
|
|
|
* damages arising from the use of this software.
|
|
|
|
*
|
|
|
|
* Permission is granted to anyone to use this software for any
|
|
|
|
* purpose, including commercial applications, and to alter it and
|
|
|
|
* redistribute it freely, subject to the following restrictions:
|
|
|
|
*
|
|
|
|
* 1. The origin of this software must not be misrepresented; you
|
|
|
|
* must not claim that you wrote the original software. If you use
|
|
|
|
* this software in a product, an acknowledgment in the product
|
|
|
|
* documentation would be appreciated but is not required.
|
|
|
|
*
|
|
|
|
* 2. Altered source versions must be plainly marked as such, and
|
|
|
|
* must not be misrepresented as being the original software.
|
|
|
|
*
|
|
|
|
* 3. This notice may not be removed or altered from any source
|
|
|
|
* distribution.
|
|
|
|
***************************************************************************/
|
|
|
|
#ifndef _CSETTINGS_H_
|
|
|
|
#define _CSETTINGS_H_
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <gctypes.h>
|
2011-06-03 22:31:09 +02:00
|
|
|
#include <vector>
|
2010-10-27 16:45:27 +02:00
|
|
|
#include "SettingsEnums.h"
|
2012-05-06 12:59:58 +02:00
|
|
|
#include "GameCube/DML_Config.h"
|
2012-07-16 18:07:24 +02:00
|
|
|
#include "GameCube/DEVO_Config.h"
|
2013-10-01 23:13:08 +02:00
|
|
|
#include "GameCube/NIN_Config.h"
|
2010-09-19 22:25:12 +02:00
|
|
|
|
|
|
|
class CSettings
|
|
|
|
{
|
2011-07-26 00:28:22 +02:00
|
|
|
public:
|
|
|
|
//!Constructor
|
|
|
|
CSettings();
|
|
|
|
//!Destructor
|
|
|
|
~CSettings();
|
|
|
|
//!Set Default Settings
|
|
|
|
void SetDefault();
|
|
|
|
//!Load Settings
|
|
|
|
bool Load();
|
|
|
|
//!Save Settings
|
|
|
|
bool Save();
|
|
|
|
//!Reset Settings
|
|
|
|
bool Reset();
|
|
|
|
//!Load a languagefile
|
|
|
|
//!\param language
|
|
|
|
bool LoadLanguage(const char *path, int language = -1);
|
2010-09-19 22:25:12 +02:00
|
|
|
|
2012-05-06 12:59:58 +02:00
|
|
|
//! System settings stuff
|
|
|
|
bool widescreen;
|
|
|
|
bool PAL50;
|
|
|
|
bool NTSC;
|
|
|
|
|
2011-07-26 00:28:22 +02:00
|
|
|
/** Variables **/
|
|
|
|
char BootDevice[10];
|
|
|
|
char unlockCode[20];
|
|
|
|
char db_language[20];
|
|
|
|
char returnTo[20];
|
|
|
|
char ConfigPath[80];
|
|
|
|
char covers_path[100];
|
|
|
|
char coversFull_path[100];
|
|
|
|
char covers2d_path[100];
|
|
|
|
char theme_path[100];
|
|
|
|
char theme[100];
|
|
|
|
char disc_path[100];
|
|
|
|
char titlestxt_path[100];
|
|
|
|
char language_path[100];
|
|
|
|
char languagefiles_path[100];
|
|
|
|
char ogg_path[150];
|
|
|
|
char Cheatcodespath[100];
|
|
|
|
char TxtCheatcodespath[100];
|
|
|
|
char BcaCodepath[100];
|
|
|
|
char WipCodepath[100];
|
|
|
|
char dolpath[100];
|
|
|
|
char update_path[100];
|
|
|
|
char homebrewapps_path[100];
|
|
|
|
char WDMpath[100];
|
|
|
|
char WiinnertagPath[100];
|
|
|
|
char NandEmuPath[50];
|
2011-11-12 19:14:09 +01:00
|
|
|
char NandEmuChanPath[50];
|
2012-05-06 12:59:58 +02:00
|
|
|
char BNRCachePath[50];
|
2012-02-09 22:18:16 +01:00
|
|
|
char GameCubePath[100];
|
2012-05-06 12:59:58 +02:00
|
|
|
char GameCubeSDPath[100];
|
2012-07-16 18:07:24 +02:00
|
|
|
char DEVOLoaderPath[100];
|
2013-10-01 23:13:08 +02:00
|
|
|
char NINLoaderPath[100];
|
2012-08-05 19:07:47 +02:00
|
|
|
char CustomBannersURL[100];
|
2011-07-26 00:28:22 +02:00
|
|
|
short videomode;
|
|
|
|
short language;
|
|
|
|
short ocarina;
|
|
|
|
short videopatch;
|
* Improved GameCube controller functions (patch by Dynamit)
R+Z=Screenshot, X=Gameinfo window, Y=Covers download
* Added Classic Controller and GameCube Controller support
in GameInfo window:
Right stick=3D Cover movement, X=Flip 3DCover 180°, L/R=Zoom
* Added Wifi6 and wifi10 pictures for GameInfo window.
(Thanks OriginalHamster)
* Added device priority selection for GameCube listing
in global Loader settings (SD->USB, or USB->SD)
* Added a "Use global" language setting for Gamecube games.
* Added support for USB devices with modified MBR's signature
to prevent WiiU's format message.
* Prevent Rockband cursor display on GameCube and WiiWare
games with "band" in the title (Crach bandicoot, Beach
Bandits, etc.)
* Added Dol's Video mode patcher in Loader/Game settings,
for games which couldn't be forced. (MadWorld, MotoGP08,
Mario Party 8, etc.)
♦ Region patch = Patches the dol's known video modes
to the region selected in "Video mode" setting,
but keep interlace/progressive references.
♦ ON = Patch all dol's known video modes to the one
selected in "Video mode" setting.
♦ ALL = Patch all dol's found video mode patterns
(even unknown video modes) to the one selected
in "Video mode" setting.
* DML: Updated DM(L) version detection up to v2.10
* DML: Automatically enable PADHook if Screenshot setting
is enabled
* DML: Fixed a bug where multiple video modes could be set
at the same time
* DEVO: Added a prompt if trying to launch a game from a
non FAT32 partition.
* DEVO: Added Direct Mapping Buttons setting (Devo r200+)
* DEVO: Added support for Language setting
* Language files updated: Chinese, French
2013-08-18 16:30:39 +02:00
|
|
|
short videoPatchDol;
|
2011-07-26 00:28:22 +02:00
|
|
|
short sinfo;
|
|
|
|
short hddinfo;
|
|
|
|
short rumble;
|
|
|
|
short xflip;
|
|
|
|
short volume;
|
|
|
|
short sfxvolume;
|
|
|
|
short gamesoundvolume;
|
|
|
|
short tooltips;
|
|
|
|
short parentalcontrol;
|
2015-03-08 17:49:07 +01:00
|
|
|
u8 LoaderIOS;
|
|
|
|
u8 cios;
|
2011-07-26 00:28:22 +02:00
|
|
|
short quickboot;
|
|
|
|
short wsprompt;
|
|
|
|
short keyset;
|
|
|
|
short GameSort;
|
|
|
|
short wiilight;
|
|
|
|
short gameDisplay;
|
|
|
|
short patchcountrystrings;
|
|
|
|
short screensaver;
|
|
|
|
short partition;
|
|
|
|
short musicloopmode;
|
|
|
|
short godmode;
|
|
|
|
short titlesOverride; // db_titles
|
|
|
|
short gridRows;
|
|
|
|
short autonetwork;
|
|
|
|
short discart;
|
2012-08-05 19:07:47 +02:00
|
|
|
short coversfull;
|
2011-07-26 00:28:22 +02:00
|
|
|
short gamesound;
|
|
|
|
short marknewtitles;
|
|
|
|
short InstallToDir;
|
|
|
|
short GameSplit;
|
|
|
|
short PlaylogUpdate;
|
|
|
|
short ShowFreeSpace;
|
|
|
|
short HomeMenu;
|
|
|
|
short MultiplePartitions;
|
|
|
|
short USBPort;
|
2014-04-25 17:34:53 +02:00
|
|
|
short USBAutoMount;
|
2011-07-26 00:28:22 +02:00
|
|
|
short CacheTitles;
|
|
|
|
short BlockIOSReload;
|
|
|
|
u32 InstallPartitions;
|
|
|
|
u32 ParentalBlocks;
|
|
|
|
f32 WSFactor;
|
|
|
|
f32 FontScaleFactor;
|
2012-05-19 15:40:58 +02:00
|
|
|
f32 ClockFontScaleFactor;
|
2011-12-28 17:27:30 +01:00
|
|
|
f32 PointerSpeed;
|
2011-07-26 00:28:22 +02:00
|
|
|
short Wiinnertag;
|
|
|
|
short SelectedGame;
|
|
|
|
short GameListOffset;
|
|
|
|
short sneekVideoPatch;
|
|
|
|
std::vector<u32> EnabledCategories;
|
2012-06-09 14:20:14 +02:00
|
|
|
std::vector<u32> RequiredCategories;
|
|
|
|
std::vector<u32> ForbiddenCategories;
|
2011-07-26 00:28:22 +02:00
|
|
|
u8 EntryIOS;
|
2013-10-01 23:13:08 +02:00
|
|
|
short UseArgumentIOS;
|
2011-07-26 00:28:22 +02:00
|
|
|
short NandEmuMode;
|
2012-01-08 19:24:46 +01:00
|
|
|
short NandEmuChanMode;
|
2011-07-26 00:28:22 +02:00
|
|
|
short UseSystemFont;
|
2011-07-29 22:59:31 +02:00
|
|
|
short Hooktype;
|
|
|
|
short WiirdDebugger;
|
|
|
|
short WiirdDebuggerPause;
|
2011-09-04 12:13:47 +02:00
|
|
|
short ShowPlayCount;
|
2015-08-14 16:44:47 +02:00
|
|
|
short bannerFavIcon;
|
2011-09-10 22:08:12 +02:00
|
|
|
short RememberUnlock;
|
2011-11-12 19:14:09 +01:00
|
|
|
short LoaderMode;
|
|
|
|
short SearchMode;
|
2011-12-23 16:48:20 +01:00
|
|
|
short GameAspectRatio;
|
2012-01-08 19:24:46 +01:00
|
|
|
short UseChanLauncher;
|
2012-02-05 19:38:26 +01:00
|
|
|
int AdjustOverscanX;
|
|
|
|
int AdjustOverscanY;
|
2012-02-29 20:52:36 +01:00
|
|
|
short ForceDiscTitles;
|
2012-05-06 12:59:58 +02:00
|
|
|
short TooltipDelay;
|
|
|
|
short GameWindowMode;
|
|
|
|
short CacheBNRFiles;
|
|
|
|
short BannerAnimStart;
|
|
|
|
float BannerGridSpeed;
|
|
|
|
short BannerZoomDuration;
|
|
|
|
float BannerProjectionOffsetX;
|
|
|
|
float BannerProjectionOffsetY;
|
|
|
|
float BannerProjectionWidth;
|
|
|
|
float BannerProjectionHeight;
|
|
|
|
float GCBannerScale;
|
2012-07-16 18:07:24 +02:00
|
|
|
short GameCubeMode;
|
2012-12-09 22:36:32 +01:00
|
|
|
short GameCubeSource;
|
2015-04-04 18:04:30 +02:00
|
|
|
short MultiDiscPrompt;
|
2012-07-22 22:30:59 +02:00
|
|
|
short DMLVideo;
|
2012-07-16 18:07:24 +02:00
|
|
|
short DMLProgPatch;
|
2012-05-06 12:59:58 +02:00
|
|
|
short DMLNMM;
|
|
|
|
short DMLActivityLED;
|
|
|
|
short DMLPADHOOK;
|
2012-07-22 19:08:54 +02:00
|
|
|
short DMLNoDisc2;
|
2012-07-19 22:13:39 +02:00
|
|
|
short DMLWidescreen;
|
2012-11-11 14:47:02 +01:00
|
|
|
short DMLScreenshot;
|
2012-08-24 18:55:49 +02:00
|
|
|
short DMLJPNPatch;
|
2012-05-06 12:59:58 +02:00
|
|
|
short DMLDebug;
|
2014-11-10 22:47:13 +01:00
|
|
|
short NINDeflicker;
|
2015-08-11 19:16:12 +02:00
|
|
|
short NINPal50Patch;
|
2015-07-12 15:01:24 +02:00
|
|
|
short NINWiiUWide;
|
|
|
|
short NINVideoScale;
|
2015-08-11 19:16:12 +02:00
|
|
|
short NINVideoOffset;
|
|
|
|
short NINRemlimit;
|
2016-10-19 15:01:42 +02:00
|
|
|
short NINArcadeMode;
|
2017-12-14 15:26:57 +01:00
|
|
|
short NINCCRumble;
|
|
|
|
short NINSkipIPL;
|
2015-07-12 15:01:24 +02:00
|
|
|
s8 NINMCEmulation;
|
2014-08-18 21:19:20 +02:00
|
|
|
short NINMCSize;
|
2013-10-01 23:13:08 +02:00
|
|
|
short NINAutoboot;
|
2015-01-04 21:22:06 +01:00
|
|
|
short NINSettings;
|
2013-10-01 23:13:08 +02:00
|
|
|
short NINUSBHID;
|
2014-08-02 18:53:56 +02:00
|
|
|
short NINMaxPads;
|
2014-11-10 22:47:13 +01:00
|
|
|
short NINNativeSI;
|
2014-08-02 18:53:56 +02:00
|
|
|
short NINOSReport;
|
|
|
|
short NINLED;
|
|
|
|
short NINLog;
|
2012-07-16 18:07:24 +02:00
|
|
|
short DEVOMCEmulation;
|
2012-10-14 18:27:01 +02:00
|
|
|
short DEVOWidescreen;
|
|
|
|
short DEVOActivityLED;
|
2013-04-14 23:02:09 +02:00
|
|
|
short DEVOFZeroAX;
|
|
|
|
short DEVOTimerFix;
|
* Improved GameCube controller functions (patch by Dynamit)
R+Z=Screenshot, X=Gameinfo window, Y=Covers download
* Added Classic Controller and GameCube Controller support
in GameInfo window:
Right stick=3D Cover movement, X=Flip 3DCover 180°, L/R=Zoom
* Added Wifi6 and wifi10 pictures for GameInfo window.
(Thanks OriginalHamster)
* Added device priority selection for GameCube listing
in global Loader settings (SD->USB, or USB->SD)
* Added a "Use global" language setting for Gamecube games.
* Added support for USB devices with modified MBR's signature
to prevent WiiU's format message.
* Prevent Rockband cursor display on GameCube and WiiWare
games with "band" in the title (Crach bandicoot, Beach
Bandits, etc.)
* Added Dol's Video mode patcher in Loader/Game settings,
for games which couldn't be forced. (MadWorld, MotoGP08,
Mario Party 8, etc.)
♦ Region patch = Patches the dol's known video modes
to the region selected in "Video mode" setting,
but keep interlace/progressive references.
♦ ON = Patch all dol's known video modes to the one
selected in "Video mode" setting.
♦ ALL = Patch all dol's found video mode patterns
(even unknown video modes) to the one selected
in "Video mode" setting.
* DML: Updated DM(L) version detection up to v2.10
* DML: Automatically enable PADHook if Screenshot setting
is enabled
* DML: Fixed a bug where multiple video modes could be set
at the same time
* DEVO: Added a prompt if trying to launch a game from a
non FAT32 partition.
* DEVO: Added Direct Mapping Buttons setting (Devo r200+)
* DEVO: Added support for Language setting
* Language files updated: Chinese, French
2013-08-18 16:30:39 +02:00
|
|
|
short DEVODButtons;
|
2014-08-18 21:19:20 +02:00
|
|
|
short DEVOCropOverscan;
|
|
|
|
short DEVODiscDelay;
|
2012-05-06 12:59:58 +02:00
|
|
|
short GCInstallCompressed;
|
|
|
|
short GCInstallAligned;
|
2014-07-12 15:17:58 +02:00
|
|
|
short PrivateServer;
|
2011-12-22 23:44:48 +01:00
|
|
|
|
|
|
|
// This variable is not saved to the settings file
|
|
|
|
bool FirstTimeRun;
|
2011-07-26 00:28:22 +02:00
|
|
|
protected:
|
|
|
|
bool ValidVersion(FILE * file);
|
|
|
|
bool SetSetting(char *name, char *value);
|
|
|
|
//!Find the config file in the default paths
|
|
|
|
bool FindConfig();
|
2010-09-19 22:25:12 +02:00
|
|
|
|
2011-07-26 00:28:22 +02:00
|
|
|
void ParseLine(char *line);
|
|
|
|
void TrimLine(char *dest, char *src, int size);
|
2010-09-19 22:25:12 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
extern CSettings Settings;
|
|
|
|
|
|
|
|
#endif
|