Remove the flickering hack by Orbb(From the Dolphin-Emu forum)
I think i got the most negatives in a row for the SVN :( git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3279 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
c85510130b
commit
e97315d0ff
|
@ -81,7 +81,6 @@ void Config::Load()
|
|||
iniFile.Get("Hacks", "EFBCopyDisable", &bEFBCopyDisable, 0);
|
||||
iniFile.Get("Hacks", "EFBCopyDisableHotKey", &bEFBCopyDisableHotKey, 0);
|
||||
iniFile.Get("Hacks", "EFBToTextureEnable", &bCopyEFBToRAM, 0);
|
||||
iniFile.Get("Hacks", "RemoveFlicker", &bRemoveFlicker, 0);
|
||||
}
|
||||
|
||||
void Config::GameIniLoad() {
|
||||
|
@ -167,8 +166,6 @@ void Config::Save()
|
|||
iniFile.Set("Hacks", "EFBCopyDisableHotKey", bEFBCopyDisableHotKey);
|
||||
iniFile.Set("Hacks", "EFBToTextureEnable", bCopyEFBToRAM);
|
||||
|
||||
iniFile.Set("Hacks", "RemoveFlicker", bRemoveFlicker);
|
||||
|
||||
iniFile.Save(FULL_CONFIG_DIR "gfx_opengl.ini");
|
||||
}
|
||||
|
||||
|
|
|
@ -100,7 +100,6 @@ struct Config
|
|||
bool bPhackvalue1, bPhackvalue2;
|
||||
float fhackvalue1, fhackvalue2;
|
||||
bool bProjHack1;
|
||||
bool bRemoveFlicker;
|
||||
|
||||
int iLog; // CONF_ bits
|
||||
int iSaveTargetId;
|
||||
|
|
|
@ -62,7 +62,6 @@ BEGIN_EVENT_TABLE(ConfigDialog,wxDialog)
|
|||
EVT_CHECKBOX(ID_DISABLETEXTURING, ConfigDialog::AdvancedSettingsChanged)
|
||||
EVT_CHECKBOX(ID_DISABLEFOG, ConfigDialog::AdvancedSettingsChanged)
|
||||
EVT_CHECKBOX(ID_EFBCOPYDISABLEHOTKEY, ConfigDialog::AdvancedSettingsChanged)
|
||||
EVT_CHECKBOX(ID_REMOVEFLICKER, ConfigDialog::AdvancedSettingsChanged)
|
||||
EVT_CHECKBOX(ID_HACK, ConfigDialog::AdvancedSettingsChanged)
|
||||
EVT_CHECKBOX(ID_SAFETEXTURECACHE,ConfigDialog::AdvancedSettingsChanged)
|
||||
EVT_CHECKBOX(ID_DSTALPHAPASS,ConfigDialog::AdvancedSettingsChanged)
|
||||
|
@ -364,7 +363,6 @@ void ConfigDialog::CreateGUIControls()
|
|||
|
||||
// Hacks controls
|
||||
m_SafeTextureCache = new wxCheckBox(m_PageAdvanced, ID_SAFETEXTURECACHE, wxT("Use Safe texture cache"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||
m_RemoveFlicker = new wxCheckBox(m_PageAdvanced, ID_REMOVEFLICKER, wxT("Remove Flicker"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||
m_PhackvalueCB = new wxChoice(m_PageAdvanced, ID_PHACKVALUE, wxDefaultPosition, wxDefaultSize, arrayStringFor_PhackvalueCB, 0, wxDefaultValidator);
|
||||
m_PhackvalueCB->Append(wxT("None"));
|
||||
m_PhackvalueCB->Append(wxT("Zelda Twilight Princess Bloom hack"));
|
||||
|
@ -377,15 +375,12 @@ void ConfigDialog::CreateGUIControls()
|
|||
|
||||
// Default values
|
||||
m_SafeTextureCache->SetValue(g_Config.bSafeTextureCache);
|
||||
m_RemoveFlicker->SetValue(g_Config.bRemoveFlicker);
|
||||
|
||||
// Tool tips
|
||||
m_SafeTextureCache->SetToolTip(wxT("This is useful to prevent Metroid Prime from crashing, but can cause problems in other games."
|
||||
"\n[This option will apply immediately and does not require a restart. However it may not"
|
||||
" be entirely safe to change it midgames.]"));
|
||||
|
||||
m_RemoveFlicker->SetToolTip(wxT("This is used to try and removing flickering in some games."));
|
||||
|
||||
m_DstAlphaPass->SetToolTip(wxT("This renders a second time to set alpha to a constant value,"
|
||||
"\nDisabling it may speed up some games, but could also cause glitches."));
|
||||
m_DisableFog->SetToolTip(wxT("This option should not require a restart."));
|
||||
|
@ -393,7 +388,6 @@ void ConfigDialog::CreateGUIControls()
|
|||
// Sizers
|
||||
sHacks = new wxGridBagSizer(0, 0);
|
||||
sHacks->Add(m_SafeTextureCache, wxGBPosition(1, 0), wxGBSpan(1, 1), wxALL, 5);
|
||||
sHacks->Add(m_RemoveFlicker,wxGBPosition(1, 1),wxGBSpan(1, 1), wxALL, 5);
|
||||
sHacks->Add(m_PhackvalueCB, wxGBPosition(0, 0), wxGBSpan(1, 1), wxALL, 5);
|
||||
|
||||
sbHacks = new wxStaticBoxSizer(wxVERTICAL, m_PageAdvanced, wxT("Hacks"));
|
||||
|
@ -600,9 +594,6 @@ void ConfigDialog::AdvancedSettingsChanged(wxCommandEvent& event)
|
|||
case ID_SAFETEXTURECACHE:
|
||||
g_Config.bSafeTextureCache = m_SafeTextureCache->IsChecked();
|
||||
break;
|
||||
case ID_REMOVEFLICKER:
|
||||
g_Config.bRemoveFlicker = m_RemoveFlicker->IsChecked();
|
||||
break;
|
||||
case ID_HACK:
|
||||
g_Config.bHack = m_Hack->IsChecked();
|
||||
break;
|
||||
|
|
|
@ -119,7 +119,6 @@ class ConfigDialog : public wxDialog
|
|||
wxCheckBox *m_DumpTextures;
|
||||
wxCheckBox *m_HiresTextures;
|
||||
wxCheckBox *m_DumpEFBTarget;
|
||||
wxCheckBox *m_RemoveFlicker;
|
||||
wxCheckBox *m_DumpFrames;
|
||||
wxCheckBox *m_FreeLook;
|
||||
wxStaticBox * m_StaticBox_EFB;
|
||||
|
@ -185,7 +184,6 @@ class ConfigDialog : public wxDialog
|
|||
ID_DUMPFRAMES,
|
||||
ID_FREELOOK,
|
||||
ID_TEXTUREPATH,
|
||||
ID_REMOVEFLICKER,
|
||||
|
||||
ID_CHECKBOX_DISABLECOPYEFB,
|
||||
ID_EFBCOPYDISABLEHOTKEY,
|
||||
|
|
|
@ -1177,22 +1177,6 @@ void Renderer::DrawDebugText()
|
|||
Renderer::RenderText(debugtext_buffer, 21, 21, 0xDD000000);
|
||||
Renderer::RenderText(debugtext_buffer, 20, 20, 0xFF00FFFF);
|
||||
}
|
||||
bool Renderer::IsBlack()
|
||||
{
|
||||
char pixels [2];
|
||||
short color[] = {GL_RED, GL_GREEN, GL_BLUE};
|
||||
|
||||
for (int i = 0; i < 2;i++)
|
||||
{
|
||||
glReadPixels(500, 300, 1, 1, GL_RGB, GL_BYTE, &pixels[i]);
|
||||
if(pixels[i] != 0)
|
||||
return false;
|
||||
else
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------------------------------------
|
||||
// We can now draw whatever we want on top of the picture. Then we copy the final picture to the output.
|
||||
// -------------------------------------------------------------------------------------------------------
|
||||
|
@ -1233,19 +1217,9 @@ void Renderer::SwapBuffers()
|
|||
}
|
||||
#endif
|
||||
// Copy the rendered frame to the real window
|
||||
// [ fix for Fragile by kamui_kun ...
|
||||
// TODO get the fix to read the whole screen not just 5 pixels
|
||||
if (g_Config.bRemoveFlicker)
|
||||
{
|
||||
BOOL pass = FALSE;
|
||||
|
||||
if(!Renderer::IsBlack())
|
||||
OpenGL_SwapBuffers();
|
||||
}
|
||||
else
|
||||
{
|
||||
OpenGL_SwapBuffers();
|
||||
}
|
||||
|
||||
|
||||
glClearColor(0, 0, 0, 0);
|
||||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
|
|
Loading…
Reference in New Issue