mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-14 21:37:52 -07:00
game.ini fix for projection hack's.
This patch is by val532 git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3206 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
42fb5a4d67
commit
5f55d4e7f0
@ -43,6 +43,7 @@ BEGIN_EVENT_TABLE(CISOProperties, wxDialog)
|
||||
EVT_CLOSE(CISOProperties::OnClose)
|
||||
EVT_BUTTON(ID_CLOSE, CISOProperties::OnCloseClick)
|
||||
EVT_BUTTON(ID_EDITCONFIG, CISOProperties::OnEditConfig)
|
||||
EVT_CHOICE(ID_HACK, CISOProperties::SetRefresh)
|
||||
EVT_CHOICE(ID_EMUSTATE, CISOProperties::SetRefresh)
|
||||
EVT_CHOICE(ID_EMU_ISSUES, CISOProperties::SetRefresh)
|
||||
EVT_LISTBOX(ID_PATCHES_LIST, CISOProperties::ListSelectionChanged)
|
||||
@ -285,6 +286,17 @@ void CISOProperties::CreateGUIControls()
|
||||
SafeTextureCache = new wxCheckBox(m_GameConfig, ID_SAFETEXTURECACHE, _("Safe Texture Cache"), wxDefaultPosition, wxDefaultSize, wxCHK_3STATE|wxCHK_ALLOW_3RD_STATE_FOR_USER, wxDefaultValidator);
|
||||
DstAlphaPass = new wxCheckBox(m_GameConfig, ID_DSTALPHAPASS, _("Distance Alpha Pass"), wxDefaultPosition, wxDefaultSize, wxCHK_3STATE|wxCHK_ALLOW_3RD_STATE_FOR_USER, wxDefaultValidator);
|
||||
UseXFB = new wxCheckBox(m_GameConfig, ID_USEXFB, _("Use XFB"), wxDefaultPosition, wxDefaultSize, wxCHK_3STATE|wxCHK_ALLOW_3RD_STATE_FOR_USER, wxDefaultValidator);
|
||||
// Hack
|
||||
Hacktext = new wxStaticText(m_GameConfig, ID_HACK_TEXT, _("Hack for: "), wxDefaultPosition, wxDefaultSize);
|
||||
arrayStringFor_Hack.Add(_("None"));
|
||||
arrayStringFor_Hack.Add(_("Zelda Twighlight Princess Bloom hack"));
|
||||
arrayStringFor_Hack.Add(_("Super Mario Galaxy"));
|
||||
arrayStringFor_Hack.Add(_("Mario Kart Wii"));
|
||||
arrayStringFor_Hack.Add(_("Sonic and the Black Knight"));
|
||||
arrayStringFor_Hack.Add(_("Bleach Versus Crusade"));
|
||||
arrayStringFor_Hack.Add(_("Final Fantasy CC Echo of Time"));
|
||||
Hack = new wxChoice(m_GameConfig, ID_HACK, wxDefaultPosition, wxDefaultSize, arrayStringFor_Hack, 0, wxDefaultValidator);
|
||||
|
||||
//HLE Audio
|
||||
sbHLEaudioOverrides = new wxStaticBoxSizer(wxVERTICAL, m_GameConfig, _("HLE Audio"));
|
||||
UseRE0Fix = new wxCheckBox(m_GameConfig, ID_RE0FIX, _("Use RE0 Fix"), wxDefaultPosition, wxDefaultSize, wxCHK_3STATE|wxCHK_ALLOW_3RD_STATE_FOR_USER, wxDefaultValidator);
|
||||
@ -319,6 +331,8 @@ void CISOProperties::CreateGUIControls()
|
||||
sbVideoOverrides->Add(SafeTextureCache, 0, wxEXPAND|wxLEFT, 5);
|
||||
sbVideoOverrides->Add(DstAlphaPass, 0, wxEXPAND|wxLEFT, 5);
|
||||
sbVideoOverrides->Add(UseXFB, 0, wxEXPAND|wxLEFT, 5);
|
||||
sbVideoOverrides->Add(Hacktext, 0, wxEXPAND|wxLEFT, 5);
|
||||
sbVideoOverrides->Add(Hack, 0, wxEXPAND|wxLEFT, 5);
|
||||
sbHLEaudioOverrides->Add(UseRE0Fix, 0, wxEXPAND|wxLEFT, 5);
|
||||
sbGameConfig->Add(sbCoreOverrides, 0, wxEXPAND);
|
||||
sbGameConfig->Add(sbWiiOverrides, 0, wxEXPAND);
|
||||
@ -655,7 +669,14 @@ void CISOProperties::LoadGameConfig()
|
||||
UseRE0Fix->Set3StateValue((wxCheckBoxState)bTemp);
|
||||
else
|
||||
UseRE0Fix->Set3StateValue(wxCHK_UNDETERMINED);
|
||||
|
||||
|
||||
GameIni.Get("Video", "Hack", &iTemp, -1);
|
||||
if (iTemp == -1)
|
||||
{
|
||||
iTemp = 0;
|
||||
bRefreshList = true;
|
||||
}
|
||||
Hack->SetSelection(iTemp);
|
||||
|
||||
GameIni.Get("EmuState", "EmulationStateId", &iTemp, -1);
|
||||
if (iTemp == -1)
|
||||
@ -760,6 +781,7 @@ bool CISOProperties::SaveGameConfig()
|
||||
else
|
||||
GameIni.Set("HLEaudio", "UseRE0Fix", UseRE0Fix->Get3StateValue());
|
||||
|
||||
GameIni.Set("Video", "Hack", EmuState->GetSelection());
|
||||
GameIni.Set("EmuState", "EmulationStateId", EmuState->GetSelection());
|
||||
GameIni.Set("EmuState", "EmulationIssues", EmuIssues->GetValue());
|
||||
|
||||
|
@ -87,6 +87,9 @@ class CISOProperties : public wxDialog
|
||||
wxCheckBox *ProjHack1, *ForceFiltering,
|
||||
*EFBCopyDisable, *EFBCopyDisableHotKey, *EFBToTextureEnable,
|
||||
*SafeTextureCache, *DstAlphaPass, *UseXFB;
|
||||
wxStaticText *Hacktext;
|
||||
wxArrayString arrayStringFor_Hack;
|
||||
wxChoice *Hack;
|
||||
// HLE Audio
|
||||
wxCheckBox *UseRE0Fix;
|
||||
|
||||
@ -163,6 +166,8 @@ class CISOProperties : public wxDialog
|
||||
ID_SAFETEXTURECACHE,
|
||||
ID_DSTALPHAPASS,
|
||||
ID_USEXFB,
|
||||
ID_HACK_TEXT,
|
||||
ID_HACK,
|
||||
ID_RE0FIX,
|
||||
ID_ENABLEPROGRESSIVESCAN,
|
||||
ID_ENABLEWIDESCREEN,
|
||||
|
@ -123,6 +123,9 @@ void Config::GameIniLoad() {
|
||||
if (iniFile->Exists("Video", "UseXFB"))
|
||||
iniFile->Get("Video", "UseXFB", &bUseXFB, 0);
|
||||
|
||||
if (iniFile->Exists("Video", "Hack"))
|
||||
iniFile->Get("Video", "Hack", &iPhackvalue, 0);
|
||||
|
||||
}
|
||||
|
||||
void Config::Save()
|
||||
|
@ -45,6 +45,7 @@ struct Config
|
||||
void Load();
|
||||
void GameIniLoad();
|
||||
void Save();
|
||||
void UpdateHack();
|
||||
|
||||
// General
|
||||
bool bFullscreen;
|
||||
|
@ -76,6 +76,8 @@ ConfigDialog::ConfigDialog(wxWindow *parent, wxWindowID id, const wxString &titl
|
||||
: wxDialog(parent, id, title, position, size, style)
|
||||
{
|
||||
g_Config.Load();
|
||||
g_Config.GameIniLoad();
|
||||
g_Config.UpdateHack();
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||
@ -522,48 +524,11 @@ void ConfigDialog::GeneralSettingsChanged(wxCommandEvent& event)
|
||||
case ID_MSAAMODECB:
|
||||
g_Config.iMultisampleMode = m_MSAAModeCB->GetSelection();
|
||||
break;
|
||||
case ID_PHACKVALUE:
|
||||
case ID_PHACKVALUE:
|
||||
g_Config.iPhackvalue = m_PhackvalueCB->GetSelection();
|
||||
if (g_Config.iPhackvalue >= 0)
|
||||
if (g_Config.iPhackvalue >= 0)
|
||||
{
|
||||
switch(g_Config.iPhackvalue)
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
g_Config.UpdateHack();
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -687,3 +652,45 @@ void ConfigDialog::UpdateGUI()
|
||||
m_FullscreenCB->Enable(!g_Config.renderToMainframe);
|
||||
m_WindowResolutionCB->Enable(!g_Config.renderToMainframe);
|
||||
}
|
||||
void Config::UpdateHack()
|
||||
{
|
||||
switch(g_Config.iPhackvalue)
|
||||
{
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -57,7 +57,7 @@ class ConfigDialog : public wxDialog
|
||||
void AddFSReso(char *reso);
|
||||
void AddWindowReso(char *reso);
|
||||
void CreateGUIControls();
|
||||
|
||||
void GameIniLoad();
|
||||
// Combo box lists, this one needs to be public
|
||||
wxArrayString arrayStringFor_FullscreenCB;
|
||||
|
||||
@ -196,6 +196,7 @@ class ConfigDialog : public wxDialog
|
||||
|
||||
void OnClose(wxCloseEvent& event);
|
||||
void UpdateGUI();
|
||||
void UpdateHack();
|
||||
|
||||
void AboutClick(wxCommandEvent& event);
|
||||
void GeneralSettingsChanged(wxCommandEvent& event);
|
||||
|
@ -222,6 +222,7 @@ void Initialize(void *init)
|
||||
g_Config.Load();
|
||||
|
||||
g_Config.GameIniLoad();
|
||||
g_Config.UpdateHack();
|
||||
|
||||
if (!OpenGL_Create(g_VideoInitialize, 640, 480)) // 640x480 will be the default if all else fails
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user