Track the running GPU backend separate from config.

This way we can change the config directly when we want to save a new
setting, rather than having hacks to use a temp var.
This commit is contained in:
Unknown W. Brackets 2016-01-05 22:37:28 -08:00
parent 8b27bc51f5
commit aa0055cea7
12 changed files with 49 additions and 43 deletions

View file

@ -50,11 +50,9 @@ void CenterDisplayOutputRect(float *x, float *y, float *w, float *h, float origW
float offsetX = (g_Config.fSmallDisplayOffsetX - 0.5f) * 2.0f * frameW;
float offsetY = (g_Config.fSmallDisplayOffsetY - 0.5f) * 2.0f * frameH;
// Have to invert Y for GL
#ifdef _WIN32
if (g_Config.iGPUBackend == GPU_BACKEND_OPENGL) { offsetY = offsetY * -1.0f; }
#else
offsetY = offsetY * -1.0f;
#endif
if (GetGPUBackend() == GPUBackend::OPENGL) {
offsetY = offsetY * -1.0f;
}
float customZoom = g_Config.fSmallDisplayCustomZoom / 8.0f;
float smallDisplayW = origW * customZoom;
float smallDisplayH = origH * customZoom;