minor change in gltest

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1625 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
nakeee
2008-12-22 22:24:59 +00:00
parent ac825114c8
commit af3341e3d6
2 changed files with 26 additions and 8 deletions

View File

@ -265,7 +265,21 @@ void X11Window::Update() {
break;
}
}
return;
float FactorW = 640.0f / (float)GetWidth();
float FactorH = 480.0f / (float)GetHeight();
float Max = (FactorW < FactorH) ? FactorH : FactorW;
// AR = (float)surface->w / (float)surface->h;;
if (g_Config.bStretchToFit) {
SetMax(1,1);
SetOffset(0,0);
} else {
SetMax(1.0f / Max, 1.0f / Max);
SetOffset((int)((GetWidth() - (640 * GetXmax())) / 2),
(int)((GetHeight() - (480 * GetYmax())) / 2));
}
}
bool X11Window::MakeCurrent() {