diff --git a/Source/Plugins/Plugin_VideoOGL/Src/GUI/ConfigDlg.cpp b/Source/Plugins/Plugin_VideoOGL/Src/GUI/ConfigDlg.cpp index 9d3607b43a..f3ab1e1f86 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/GUI/ConfigDlg.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/GUI/ConfigDlg.cpp @@ -526,47 +526,44 @@ void ConfigDialog::GeneralSettingsChanged(wxCommandEvent& event) g_Config.iPhackvalue = m_PhackvalueCB->GetSelection(); if (g_Config.iPhackvalue >= 0) { - if (g_Config.iPhackvalue == 0) + switch(g_Config.iPhackvalue) { - g_Config.bPhackvalue1 = 0; - g_Config.bPhackvalue2 = 0; - } - if (g_Config.iPhackvalue == 1) - { - g_Config.bProjectionHax1 = 1; - } - if (g_Config.iPhackvalue == 2) - { - g_Config.bPhackvalue1 = 1; - g_Config.fhackvalue1 = 0.00006f; - g_Config.bPhackvalue2 = 0; - } - if (g_Config.iPhackvalue == 3) - { - g_Config.bPhackvalue1 = 1; - g_Config.fhackvalue1 = 0.0006f; - g_Config.bPhackvalue2 = 0; - } - if (g_Config.iPhackvalue == 4) - { - g_Config.bPhackvalue1 = 1; - g_Config.fhackvalue1 = 0.00002f; - g_Config.bPhackvalue2 = 1; - g_Config.fhackvalue2 = 1.999980f; - } - if (g_Config.iPhackvalue == 5) - { - g_Config.bPhackvalue2 = 1; - g_Config.fhackvalue2 = 0.5f; - g_Config.bPhackvalue1 = 0; - } - if (g_Config.iPhackvalue == 6) - { - g_Config.bPhackvalue1 = 1; - g_Config.fhackvalue1 = 0.8f; - g_Config.bPhackvalue2 = 1; - g_Config.fhackvalue2 = 1.2f; + case OGL_HACK_NONE: + g_Config.bPhackvalue1 = 0; + g_Config.bPhackvalue2 = 0; + break; + case OGL_HACK_ZELDA_TP_BLOOM_HACK: + g_Config.bPhackvalue1 = 1; + break; + case OGL_HACK_SUPER_MARIO_GALAXY: + g_Config.bPhackvalue1 = 1; + g_Config.fhackvalue1 = 0.00006f; + g_Config.bPhackvalue2 = 0; + break; + case OGL_HACK_MARIO_KART_WII: + g_Config.bPhackvalue1 = 1; + g_Config.fhackvalue1 = 0.00006f; + g_Config.bPhackvalue2 = 0; + break; + case OGL_HACK_SONIC_AND_THE_BLACK_KNIGHT: + g_Config.bPhackvalue1 = 1; + g_Config.fhackvalue1 = 0.00002f; + g_Config.bPhackvalue2 = 1; + g_Config.fhackvalue2 = 1.999980f; + break; + case OGL_HACK_BLEACH_VERSUS_CRUSADE: + g_Config.bPhackvalue2 = 1; + g_Config.fhackvalue2 = 0.5f; + g_Config.bPhackvalue1 = 0; + break; + case OGL_HACK_FINAL_FANTASY_CC_ECHO_OF_TIME: + g_Config.bPhackvalue1 = 1; + g_Config.fhackvalue1 = 0.8f; + g_Config.bPhackvalue2 = 1; + g_Config.fhackvalue2 = 1.2f; + break; } + } break; } diff --git a/Source/Plugins/Plugin_VideoOGL/Src/GUI/ConfigDlg.h b/Source/Plugins/Plugin_VideoOGL/Src/GUI/ConfigDlg.h index f2e895d453..6000af0f92 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/GUI/ConfigDlg.h +++ b/Source/Plugins/Plugin_VideoOGL/Src/GUI/ConfigDlg.h @@ -31,6 +31,17 @@ #include #include +enum +{ + OGL_HACK_NONE = 0, + OGL_HACK_ZELDA_TP_BLOOM_HACK = 1, + OGL_HACK_SUPER_MARIO_GALAXY = 2, + OGL_HACK_MARIO_KART_WII = 3, + OGL_HACK_SONIC_AND_THE_BLACK_KNIGHT = 4, + OGL_HACK_BLEACH_VERSUS_CRUSADE = 5, + OGL_HACK_FINAL_FANTASY_CC_ECHO_OF_TIME = 6, +}; + class ConfigDialog : public wxDialog {