more code cleanup

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1622 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
nakeee
2008-12-21 21:02:43 +00:00
parent 1b0cb56d2b
commit a7c4697d22
16 changed files with 73 additions and 55 deletions

View File

@ -27,14 +27,12 @@ X11Window::X11Window(int _iwidth, int _iheight) {
float Max = (FactorW < FactorH) ? FactorH : FactorW;
if(g_Config.bStretchToFit) {
MValueX = 1.0f / FactorW;
MValueY = 1.0f / FactorH;
SetMax(1.0f / FactorW, 1.0f / FactorH);
SetOffset(0,0);
} else {
MValueX = 1.0f / Max;
MValueY = 1.0f / Max;
SetOffset((int)((_twidth - (640 * MValueX)) / 2),
(int)((_theight - (480 * MValueY)) / 2));
SetMax(1.0f / Max, 1.0f / Max);
SetOffset((int)((_twidth - (640 * GetXmax())) / 2),
(int)((_theight - (480 * GetYmax())) / 2));
}
XVisualInfo *vi;