Fix a bug where changing resolution wouldn't make a difference on a fly

This commit is contained in:
DanyalZia 2014-01-26 18:59:40 +05:00
parent a45a2cafa3
commit 61a15c1465
2 changed files with 15 additions and 5 deletions

View File

@ -1520,6 +1520,14 @@ void FramebufferManager::EndFrame() {
if (resized_) {
DestroyAllFBOs();
glstate.viewport.set(0, 0, PSP_CoreParameter().pixelWidth, PSP_CoreParameter().pixelHeight);
int zoom = g_Config.iInternalResolution;
if (zoom != 0)
{
PSP_CoreParameter().renderWidth = 480 * zoom;
PSP_CoreParameter().renderHeight = 272 * zoom;
PSP_CoreParameter().outputWidth = 480 * zoom;
PSP_CoreParameter().outputHeight = 272 * zoom;
}
resized_ = false;
}

View File

@ -225,12 +225,13 @@ namespace MainWindow
// Round up to a zoom factor for the render size.
int zoom = g_Config.iInternalResolution;
if (zoom == 0) // auto mode
{
zoom = (rc.right - rc.left + 479) / 480;
PSP_CoreParameter().renderWidth = 480 * zoom;
PSP_CoreParameter().renderHeight = 272 * zoom;
PSP_CoreParameter().outputWidth = 480 * zoom;
PSP_CoreParameter().outputHeight = 272 * zoom;
PSP_CoreParameter().renderWidth = 480 * zoom;
PSP_CoreParameter().renderHeight = 272 * zoom;
PSP_CoreParameter().outputWidth = 480 * zoom;
PSP_CoreParameter().outputHeight = 272 * zoom;
}
if (displayOSM) {
I18NCategory *g = GetI18NCategory("Graphics");
@ -259,6 +260,7 @@ namespace MainWindow
g_Config.iInternalResolution = 0;
}
// Taking auto-texture scaling into account
if (g_Config.iTexScalingLevel == TEXSCALING_AUTO)
setTexScalingMultiplier(0);