Forgot a file for last commit :(

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4452 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
sl1nk3.s 2009-10-22 20:22:50 +00:00
parent 833341696b
commit 9c9025f089
1 changed files with 58 additions and 59 deletions

View File

@ -293,15 +293,11 @@ bool Renderer::Init()
// Decide frambuffer size // Decide frambuffer size
int W = (int)OpenGL_GetBackbufferWidth(), H = (int)OpenGL_GetBackbufferHeight(); int W = (int)OpenGL_GetBackbufferWidth(), H = (int)OpenGL_GetBackbufferHeight();
if (g_ActiveConfig.bNativeResolution)
if (g_ActiveConfig.b2xResolution)
{ {
m_FrameBufferWidth = EFB_WIDTH; m_FrameBufferWidth = (2 * EFB_HEIGHT >= W) ? 2 * EFB_HEIGHT : W;
m_FrameBufferHeight = EFB_HEIGHT; m_FrameBufferHeight = (2 * EFB_HEIGHT >= H) ? 2 * EFB_HEIGHT : H;
}
else if (g_ActiveConfig.b2xResolution)
{
m_FrameBufferWidth = 2 * EFB_WIDTH;
m_FrameBufferHeight = 2 * EFB_HEIGHT;
} }
else else
{ {
@ -324,7 +320,7 @@ bool Renderer::Init()
m_CustomHeight = (int)OpenGL_GetBackbufferHeight(); m_CustomHeight = (int)OpenGL_GetBackbufferHeight();
// Because of the fixed framebuffer size we need to disable the resolution options while running // Because of the fixed framebuffer size we need to disable the resolution options while running
g_ActiveConfig.bRunning = true; g_Config.bRunning = true;
if (GL_REPORT_ERROR() != GL_NO_ERROR) if (GL_REPORT_ERROR() != GL_NO_ERROR)
bSuccess = false; bSuccess = false;
@ -1154,64 +1150,67 @@ void Renderer::DrawDebugText()
} }
// OSD Menu messages // OSD Menu messages
if (OSDChoice > 0 && g_ActiveConfig.bEFBCopyDisableHotKey) if (g_ActiveConfig.bOSDHotKey)
{ {
OSDTime = timeGetTime() + 3000; if (OSDChoice > 0)
OSDChoice = -OSDChoice; {
} OSDTime = timeGetTime() + 3000;
if ((u32)OSDTime > timeGetTime() && g_ActiveConfig.bEFBCopyDisableHotKey) OSDChoice = -OSDChoice;
{ }
std::string T1 = "", T2 = ""; if ((u32)OSDTime > timeGetTime())
std::vector<std::string> T0; {
std::string T1 = "", T2 = "";
std::vector<std::string> T0;
int W, H; int W, H;
sscanf(g_ActiveConfig.cInternalRes, "%dx%d", &W, &H); sscanf(g_ActiveConfig.cInternalRes, "%dx%d", &W, &H);
std::string OSDM1 = std::string OSDM1 =
g_ActiveConfig.bNativeResolution || g_ActiveConfig.b2xResolution ? g_ActiveConfig.bNativeResolution || g_ActiveConfig.b2xResolution ?
(g_ActiveConfig.bNativeResolution ? (g_ActiveConfig.bNativeResolution ?
StringFromFormat("%i x %i (native)", OSDInternalW, OSDInternalH) StringFromFormat("%i x %i (native)", OSDInternalW, OSDInternalH)
: StringFromFormat("%i x %i (2x)", OSDInternalW, OSDInternalH)) : StringFromFormat("%i x %i (2x)", OSDInternalW, OSDInternalH))
: StringFromFormat("%i x %i (custom)", W, H); : StringFromFormat("%i x %i (custom)", W, H);
std::string OSDM21 = std::string OSDM21 =
!(g_ActiveConfig.bKeepAR43 || g_ActiveConfig.bKeepAR169) ? "-": (g_ActiveConfig.bKeepAR43 ? "4:3" : "16:9"); !(g_ActiveConfig.bKeepAR43 || g_ActiveConfig.bKeepAR169) ? "-": (g_ActiveConfig.bKeepAR43 ? "4:3" : "16:9");
std::string OSDM22 = std::string OSDM22 =
g_ActiveConfig.bCrop ? " (crop)" : ""; g_ActiveConfig.bCrop ? " (crop)" : "";
std::string OSDM31 = std::string OSDM31 =
g_ActiveConfig.bCopyEFBToRAM ? "RAM" : "Texture"; g_ActiveConfig.bCopyEFBToRAM ? "RAM" : "Texture";
std::string OSDM32 = std::string OSDM32 =
g_ActiveConfig.bEFBCopyDisable ? "No" : "Yes"; g_ActiveConfig.bEFBCopyDisable ? "No" : "Yes";
// If there is more text than this we will have a collission // If there is more text than this we will have a collission
if (g_ActiveConfig.bShowFPS) if (g_ActiveConfig.bShowFPS)
{ T1 += "\n\n"; T2 += "\n\n"; } { T1 += "\n\n"; T2 += "\n\n"; }
// The rows // The rows
T0.push_back(StringFromFormat("3: Internal Resolution: %s\n", OSDM1.c_str())); 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("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("5: Copy Embedded Framebuffer to %s: %s\n", OSDM31.c_str(), OSDM32.c_str()));
T0.push_back(StringFromFormat("6: Fog: %s\n", g_ActiveConfig.bDisableFog ? "Disabled" : "Enabled")); 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")); T0.push_back(StringFromFormat("7: Material Lighting: %s\n", g_ActiveConfig.bDisableLighting ? "Disabled" : "Enabled"));
// The latest changed setting in yellow // The latest changed setting in yellow
T1 += (OSDChoice == -1) ? T0.at(0) : "\n"; T1 += (OSDChoice == -1) ? T0.at(0) : "\n";
T1 += (OSDChoice == -2) ? T0.at(1) : "\n"; T1 += (OSDChoice == -2) ? T0.at(1) : "\n";
T1 += (OSDChoice == -3) ? T0.at(2) : "\n"; T1 += (OSDChoice == -3) ? T0.at(2) : "\n";
T1 += (OSDChoice == -4) ? T0.at(3) : "\n"; T1 += (OSDChoice == -4) ? T0.at(3) : "\n";
T1 += (OSDChoice == -5) ? T0.at(4) : "\n"; T1 += (OSDChoice == -5) ? T0.at(4) : "\n";
// The other settings in cyan // The other settings in cyan
T2 += !(OSDChoice == -1) ? T0.at(0) : "\n"; T2 += (OSDChoice != -1) ? T0.at(0) : "\n";
T2 += !(OSDChoice == -2) ? T0.at(1) : "\n"; T2 += (OSDChoice != -2) ? T0.at(1) : "\n";
T2 += !(OSDChoice == -3) ? T0.at(2) : "\n"; T2 += (OSDChoice != -3) ? T0.at(2) : "\n";
T2 += !(OSDChoice == -4) ? T0.at(3) : "\n"; T2 += (OSDChoice != -4) ? T0.at(3) : "\n";
T2 += !(OSDChoice == -5) ? T0.at(4) : "\n"; T2 += (OSDChoice != -5) ? T0.at(4) : "\n";
// Render a shadow, and then the text // Render a shadow, and then the text
Renderer::RenderText(T1.c_str(), 21, 21, 0xDD000000); Renderer::RenderText(T1.c_str(), 21, 21, 0xDD000000);
Renderer::RenderText(T1.c_str(), 20, 20, 0xFFffff00); Renderer::RenderText(T1.c_str(), 20, 20, 0xFFffff00);
Renderer::RenderText(T2.c_str(), 21, 21, 0xDD000000); Renderer::RenderText(T2.c_str(), 21, 21, 0xDD000000);
Renderer::RenderText(T2.c_str(), 20, 20, 0xFF00FFFF); Renderer::RenderText(T2.c_str(), 20, 20, 0xFF00FFFF);
}
} }
} }
void Renderer::RenderText(const char* pstr, int left, int top, u32 color) void Renderer::RenderText(const char* pstr, int left, int top, u32 color)