diff --git a/src/common/ConfigManager.cpp b/src/common/ConfigManager.cpp
index f3c8bb5b..87248978 100644
--- a/src/common/ConfigManager.cpp
+++ b/src/common/ConfigManager.cpp
@@ -110,7 +110,6 @@ int autoFireMaxCount = 1;
int autoFrameSkip = 0;
int autoPatch;
int captureFormat = 0;
-int colorizerHack = 0;
int disableStatusMessages = 0;
int filter = kStretch2x;
int frameSkip = 1;
@@ -124,8 +123,6 @@ int preparedCheats = 0;
int rewindTimer = 0;
int showSpeed;
int showSpeedTransparent;
-bool allowKeyboardBackgroundInput = false;
-bool allowJoystickBackgroundInput = true;
const char* preparedCheatCodes[MAX_CHEATS];
@@ -158,7 +155,6 @@ struct option argOptions[] = {
{ "cheat", required_argument, 0, OPT_CHEAT },
{ "cheats-enabled", no_argument, &coreOptions.cheatsEnabled, 1 },
{ "color-option", no_argument, &gbColorOption, 1 },
- { "colorizer-hack", no_argument, &colorizerHack, 1 },
{ "config", required_argument, 0, 'c' },
{ "cpu-disable-sfx", no_argument, &coreOptions.cpuDisableSfx, 1 },
{ "cpu-save-type", required_argument, 0, OPT_CPU_SAVE_TYPE },
@@ -289,8 +285,6 @@ void ValidateConfig()
void LoadConfig()
{
agbPrint = ReadPrefHex("agbPrint");
- allowKeyboardBackgroundInput = ReadPref("allowKeyboardBackgroundInput", false);
- allowJoystickBackgroundInput = ReadPref("allowJoystickBackgroundInput", true);
autoFireMaxCount = fromDec(ReadPrefString("autoFireMaxCount"));
autoFrameSkip = ReadPref("autoFrameSkip", 0);
autoPatch = ReadPref("autoPatch", 1);
@@ -300,7 +294,6 @@ void LoadConfig()
biosFileNameGBC = ReadPrefString("biosFileGBC");
captureFormat = ReadPref("captureFormat", 0);
coreOptions.cheatsEnabled = ReadPref("cheatsEnabled", 0);
- colorizerHack = ReadPref("colorizerHack", 0);
coreOptions.cpuDisableSfx = ReadPref("disableSfx", 0);
coreOptions.cpuSaveType = ReadPrefHex("saveType");
disableStatusMessages = ReadPrefHex("disableStatus");
diff --git a/src/common/ConfigManager.h b/src/common/ConfigManager.h
index ffdfc520..c00b8a0e 100644
--- a/src/common/ConfigManager.h
+++ b/src/common/ConfigManager.h
@@ -54,7 +54,6 @@ extern int autoFireMaxCount;
extern int autoFrameSkip;
extern int autoPatch;
extern int captureFormat;
-extern int colorizerHack;
extern int disableStatusMessages;
extern int filter;
extern int frameSkip;
@@ -67,8 +66,6 @@ extern int pauseWhenInactive;
extern int rewindTimer;
extern int showSpeed;
extern int showSpeedTransparent;
-extern bool allowKeyboardBackgroundInput;
-extern bool allowJoystickBackgroundInput;
extern int preparedCheats;
extern const char *preparedCheatCodes[MAX_CHEATS];
diff --git a/src/wx/cmdevents.cpp b/src/wx/cmdevents.cpp
index 0a69edee..6e735bf5 100644
--- a/src/wx/cmdevents.cpp
+++ b/src/wx/cmdevents.cpp
@@ -1688,30 +1688,21 @@ EVT_HANDLER(JoypadAutoholdStart, "Autohold Start (toggle)")
EVT_HANDLER(AllowKeyboardBackgroundInput, "Allow keyboard background input (toggle)")
{
- bool menuPress = false;
- GetMenuOptionBool("AllowKeyboardBackgroundInput", &menuPress);
- toggleBooleanVar(&menuPress, &allowKeyboardBackgroundInput);
- SetMenuOption("AllowKeyboardBackgroundInput", allowKeyboardBackgroundInput ? 1 : 0);
+ GetMenuOptionConfig("AllowKeyboardBackgroundInput",
+ config::OptionID::kUIAllowKeyboardBackgroundInput);
disableKeyboardBackgroundInput();
-
- if (allowKeyboardBackgroundInput) {
+ if (OPTION(kUIAllowKeyboardBackgroundInput)) {
if (panel && panel->panel) {
enableKeyboardBackgroundInput(panel->panel->GetWindow());
}
}
-
- update_opts();
}
EVT_HANDLER(AllowJoystickBackgroundInput, "Allow joystick background input (toggle)")
{
- bool menuPress = false;
- GetMenuOptionBool("AllowJoystickBackgroundInput", &menuPress);
- toggleBooleanVar(&menuPress, &allowJoystickBackgroundInput);
- SetMenuOption("AllowJoystickBackgroundInput", allowJoystickBackgroundInput ? 1 : 0);
-
- update_opts();
+ GetMenuOptionConfig("AllowKeyboardBackgroundInput",
+ config::OptionID::kUIAllowJoystickBackgroundInput);
}
EVT_HANDLER_MASK(LoadGameRecent, "Load most recent save", CMDEN_SAVST)
@@ -1996,18 +1987,13 @@ EVT_HANDLER(CheatsEnable, "Enable cheats (toggle)")
EVT_HANDLER(ColorizerHack, "Enable Colorizer Hack (toggle)")
{
- bool val = false;
- GetMenuOptionBool("ColorizerHack", &val);
-
- if (val && gopts.use_bios_file_gb) {
- wxLogError(_("Cannot use Colorizer Hack when Game Boy BIOS File is enabled."));
- val = 0;
+ GetMenuOptionConfig("ColorizerHack", config::OptionID::kGBColorizerHack);
+ if (OPTION(kGBColorizerHack) && gopts.use_bios_file_gb) {
+ wxLogError(
+ _("Cannot use Colorizer Hack when Game Boy BIOS File is enabled."));
SetMenuOption("ColorizerHack", 0);
+ OPTION(kGBColorizerHack) = false;
}
-
- colorizerHack = val;
-
- update_opts();
}
// Debug menu
@@ -3128,7 +3114,7 @@ EVT_HANDLER(BootRomGB, "Use the specified BIOS file for GB")
int val = 0;
GetMenuOptionInt("BootRomGB", &val, 1);
- if (val == 1 && colorizerHack == 1) {
+ if (val == 1 && OPTION(kGBColorizerHack)) {
wxLogError(_("Cannot use Game Boy BIOS when Colorizer Hack is enabled."));
val = 0;
SetMenuOption("BootRomGB", 0);
diff --git a/src/wx/config/internal/option-internal.cpp b/src/wx/config/internal/option-internal.cpp
index a745ed4d..bfa78e4f 100644
--- a/src/wx/config/internal/option-internal.cpp
+++ b/src/wx/config/internal/option-internal.cpp
@@ -161,15 +161,23 @@ std::array