mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-30 09:39:46 -06:00
Fies Issue 1584
OSD and Hotkey to do quick config toggling git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4984 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -81,10 +81,10 @@ void CopyEFB(const BPCmd &bp, const EFBRectangle &rc, const u32 &address, const
|
||||
// bpmem.zcontrol.pixel_format to PIXELFMT_Z24 is when the game wants to copy from ZBuffer (Zbuffer uses 24-bit Format)
|
||||
if (!g_ActiveConfig.bEFBCopyDisable)
|
||||
{
|
||||
if (g_ActiveConfig.bCopyEFBToRAM) // To RAM
|
||||
TextureConverter::EncodeToRam(address, fromZBuffer, isIntensityFmt, copyfmt, scaleByHalf, rc);
|
||||
else // To OGL Texture
|
||||
if (g_ActiveConfig.bCopyEFBToTexture) // To OGL Texture
|
||||
TextureMngr::CopyRenderTargetToTexture(address, fromZBuffer, isIntensityFmt, copyfmt, scaleByHalf, rc);
|
||||
else // To RAM
|
||||
TextureConverter::EncodeToRam(address, fromZBuffer, isIntensityFmt, copyfmt, scaleByHalf, rc);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -415,7 +415,7 @@ void GFXConfigDialogOGL::CreateGUIControls()
|
||||
m_Radio_CopyEFBToRAM->SetToolTip(wxT("[This option will apply immediately and does not require a restart to take effect.]"));
|
||||
m_Radio_CopyEFBToGL = new wxRadioButton(m_PageAdvanced, ID_RADIO_COPYEFBTOGL, wxT("Copy EFB to GL texture (hack)"));
|
||||
m_Radio_CopyEFBToGL->SetToolTip(wxT("[This option will apply immediately and does not require a restart to take effect.]"));
|
||||
g_Config.bCopyEFBToRAM ? m_Radio_CopyEFBToRAM->SetValue(true) : m_Radio_CopyEFBToGL->SetValue(true);
|
||||
g_Config.bCopyEFBToTexture ? m_Radio_CopyEFBToGL->SetValue(true) : m_Radio_CopyEFBToRAM->SetValue(true);
|
||||
|
||||
// Utility
|
||||
sbUtilities = new wxStaticBoxSizer(wxVERTICAL, m_PageAdvanced, wxT("Utilities"));
|
||||
@ -718,10 +718,10 @@ void GFXConfigDialogOGL::AdvancedSettingsChanged(wxCommandEvent& event)
|
||||
g_Config.bHack = m_Hack->IsChecked();
|
||||
break;
|
||||
case ID_RADIO_COPYEFBTORAM:
|
||||
g_Config.bCopyEFBToRAM = true;
|
||||
g_Config.bCopyEFBToTexture = false;
|
||||
break;
|
||||
case ID_RADIO_COPYEFBTOGL:
|
||||
g_Config.bCopyEFBToRAM = false;
|
||||
g_Config.bCopyEFBToTexture = true;
|
||||
break;
|
||||
case ID_PROJSTATS:
|
||||
g_Config.bOverlayProjStats = m_ProjStats->IsChecked();
|
||||
|
@ -110,13 +110,20 @@ void OSDMenu(WPARAM wParam)
|
||||
case '4':
|
||||
OSDChoice = 2;
|
||||
// Toggle aspect ratio
|
||||
g_Config.iAspectRatio++;
|
||||
g_Config.iAspectRatio &= 3;
|
||||
g_Config.iAspectRatio = (g_Config.iAspectRatio + 1) & 3;
|
||||
break;
|
||||
case '5':
|
||||
OSDChoice = 3;
|
||||
// Toggle EFB copy
|
||||
g_Config.bEFBCopyDisable = !g_Config.bEFBCopyDisable;
|
||||
if (g_Config.bEFBCopyDisable || g_Config.bCopyEFBToTexture)
|
||||
{
|
||||
g_Config.bEFBCopyDisable = !g_Config.bEFBCopyDisable;
|
||||
g_Config.bCopyEFBToTexture = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
g_Config.bCopyEFBToTexture = !g_Config.bCopyEFBToTexture;
|
||||
}
|
||||
break;
|
||||
case '6':
|
||||
OSDChoice = 4;
|
||||
|
@ -1079,9 +1079,9 @@ void Renderer::Swap(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight)
|
||||
GL_REPORT_ERRORD();
|
||||
g_Config.iSaveTargetId = 0;
|
||||
|
||||
bool last_copy_efb_to_ram = g_ActiveConfig.bCopyEFBToRAM;
|
||||
bool last_copy_efb_to_ram = !g_ActiveConfig.bCopyEFBToTexture;
|
||||
UpdateActiveConfig();
|
||||
if (last_copy_efb_to_ram != g_ActiveConfig.bCopyEFBToRAM)
|
||||
if (last_copy_efb_to_ram != g_ActiveConfig.bCopyEFBToTexture)
|
||||
TextureMngr::ClearRenderTargets();
|
||||
|
||||
// For testing zbuffer targets.
|
||||
@ -1188,14 +1188,26 @@ void Renderer::DrawDebugText()
|
||||
StringFromFormat("%i x %i (native)", OSDInternalW, OSDInternalH)
|
||||
: StringFromFormat("%i x %i (2x)", OSDInternalW, OSDInternalH))
|
||||
: StringFromFormat("%i x %i (custom)", W, H);
|
||||
std::string OSDM21 = "";
|
||||
// !(g_ActiveConfig.bKeepAR43 || g_ActiveConfig.bKeepAR169) ? "-": (g_ActiveConfig.bKeepAR43 ? "4:3" : "16:9");
|
||||
std::string OSDM21;
|
||||
switch(g_ActiveConfig.iAspectRatio)
|
||||
{
|
||||
case ASPECT_AUTO:
|
||||
OSDM21 = "Auto";
|
||||
break;
|
||||
case ASPECT_FORCE_16_9:
|
||||
OSDM21 = "16:9";
|
||||
break;
|
||||
case ASPECT_FORCE_4_3:
|
||||
OSDM21 = "4:3";
|
||||
break;
|
||||
case ASPECT_STRETCH:
|
||||
OSDM21 = "Stretch";
|
||||
break;
|
||||
}
|
||||
std::string OSDM22 =
|
||||
g_ActiveConfig.bCrop ? " (crop)" : "";
|
||||
std::string OSDM31 =
|
||||
g_ActiveConfig.bCopyEFBToRAM ? "RAM" : "Texture";
|
||||
std::string OSDM32 =
|
||||
g_ActiveConfig.bEFBCopyDisable ? "No" : "Yes";
|
||||
std::string OSDM3 = g_ActiveConfig.bEFBCopyDisable ? "Disabled" :
|
||||
g_ActiveConfig.bCopyEFBToTexture ? "To Texture" : "To RAM";
|
||||
|
||||
// If there is more text than this we will have a collission
|
||||
if (g_ActiveConfig.bShowFPS)
|
||||
@ -1203,8 +1215,8 @@ void Renderer::DrawDebugText()
|
||||
|
||||
// The rows
|
||||
T0.push_back(StringFromFormat("3: Internal Resolution: %s\n", OSDM1.c_str()));
|
||||
T0.push_back(StringFromFormat("4: Lock Aspect Ratio: %s%s\n", OSDM21.c_str(), OSDM22.c_str()));
|
||||
T0.push_back(StringFromFormat("5: Copy Embedded Framebuffer to %s: %s\n", OSDM31.c_str(), OSDM32.c_str()));
|
||||
T0.push_back(StringFromFormat("4: Aspect Ratio: %s%s\n", OSDM21.c_str(), OSDM22.c_str()));
|
||||
T0.push_back(StringFromFormat("5: Copy EFB: %s\n", OSDM3.c_str()));
|
||||
T0.push_back(StringFromFormat("6: Fog: %s\n", g_ActiveConfig.bDisableFog ? "Disabled" : "Enabled"));
|
||||
T0.push_back(StringFromFormat("7: Material Lighting: %s\n", g_ActiveConfig.bDisableLighting ? "Disabled" : "Enabled"));
|
||||
|
||||
|
Reference in New Issue
Block a user