From c71186b35a366a426cc1686479afd14bc85e257d Mon Sep 17 00:00:00 2001 From: Sacha Date: Thu, 28 Nov 2013 14:59:17 +1000 Subject: [PATCH] Partial Stretch: This setting is needed on other devices too. --- Core/Config.cpp | 4 +--- Core/Config.h | 2 -- GPU/Directx9/FramebufferDX9.cpp | 2 -- GPU/GLES/Framebuffer.cpp | 2 -- UI/GameSettingsScreen.cpp | 4 +--- 5 files changed, 2 insertions(+), 12 deletions(-) diff --git a/Core/Config.cpp b/Core/Config.cpp index 6fe6f0d80e..1d77a6e6be 100644 --- a/Core/Config.cpp +++ b/Core/Config.cpp @@ -184,9 +184,7 @@ void Config::Load(const char *iniFileName, const char *controllerIniFilename) { #ifdef _WIN32 graphics->Get("FullScreen", &bFullScreen, false); #endif -#ifdef BLACKBERRY - graphics->Get("PartialStretch", &bPartialStretch, pixel_xres == pixel_yres); -#endif + graphics->Get("PartialStretch", &bPartialStretch, pixel_xres < 1.3 * pixel_yres); graphics->Get("StretchToDisplay", &bStretchToDisplay, false); graphics->Get("TrueColor", &bTrueColor, true); graphics->Get("MipMap", &bMipMap, true); diff --git a/Core/Config.h b/Core/Config.h index 9a445c794b..c4d19708c2 100644 --- a/Core/Config.h +++ b/Core/Config.h @@ -77,9 +77,7 @@ public: int iRenderingMode; // 0 = non-buffered rendering 1 = buffered rendering 2 = Read Framebuffer to memory (CPU) 3 = Read Framebuffer to memory (GPU) int iTexFiltering; // 1 = off , 2 = nearest , 3 = linear , 4 = linear(CG) -#ifdef BLACKBERRY bool bPartialStretch; -#endif bool bStretchToDisplay; bool bVSync; int iFrameSkip; diff --git a/GPU/Directx9/FramebufferDX9.cpp b/GPU/Directx9/FramebufferDX9.cpp index fa7add6596..259fd8eee0 100644 --- a/GPU/Directx9/FramebufferDX9.cpp +++ b/GPU/Directx9/FramebufferDX9.cpp @@ -79,11 +79,9 @@ void CenterRect(float *x, float *y, float *w, float *h, *x = 0.0f; *w = frameW; *h = frameW / origRatio; -#ifdef BLACKBERRY // Stretch a little bit if (g_Config.bPartialStretch) *h = (frameH + *h) / 2.0f; // (408 + 720) / 2 = 564 -#endif *y = (frameH - *h) / 2.0f; } else diff --git a/GPU/GLES/Framebuffer.cpp b/GPU/GLES/Framebuffer.cpp index 5acab52df1..5a332daac0 100644 --- a/GPU/GLES/Framebuffer.cpp +++ b/GPU/GLES/Framebuffer.cpp @@ -133,11 +133,9 @@ void CenterRect(float *x, float *y, float *w, float *h, *x = 0.0f; *w = frameW; *h = frameW / origRatio; -#ifdef BLACKBERRY // Stretch a little bit if (g_Config.bPartialStretch) *h = (frameH + *h) / 2.0f; // (408 + 720) / 2 = 564 -#endif *y = (frameH - *h) / 2.0f; } else { // Image is taller than frame. Center horizontally. diff --git a/UI/GameSettingsScreen.cpp b/UI/GameSettingsScreen.cpp index 03131cbd29..9d57987d0e 100644 --- a/UI/GameSettingsScreen.cpp +++ b/UI/GameSettingsScreen.cpp @@ -123,10 +123,8 @@ void GameSettingsScreen::CreateViews() { graphicsSettings->Add(new CheckBox(&g_Config.bFullScreen, gs->T("FullScreen")))->OnClick.Handle(this, &GameSettingsScreen::OnFullscreenChange); #endif graphicsSettings->Add(new CheckBox(&g_Config.bStretchToDisplay, gs->T("Stretch to Display"))); -#ifdef BLACKBERRY - if (pixel_xres == pixel_yres) + if (pixel_xres < pixel_yres * 1.3) // Smaller than 4:3 graphicsSettings->Add(new CheckBox(&g_Config.bPartialStretch, gs->T("Partial Vertical Stretch"))); -#endif graphicsSettings->Add(new CheckBox(&g_Config.bMipMap, gs->T("Mipmapping"))); graphicsSettings->Add(new ItemHeader(gs->T("Performance")));