From c33352410441ce5656f7c65eea696b5f799fefeb Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Tue, 9 Aug 2005 01:21:07 +0000 Subject: [PATCH] Fixed resolution selection and added 1920x1200 mode for my monitor. :) --- Source/GameTick.cpp | 7 ++++++- Source/OpenGL_Windows.cpp | 18 ++++++++++++++++-- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/Source/GameTick.cpp b/Source/GameTick.cpp index de6c79e..a12819b 100644 --- a/Source/GameTick.cpp +++ b/Source/GameTick.cpp @@ -2116,8 +2116,9 @@ void Game::Tick() if(newscreenwidth==840&&newscreenheight==524)whichres=5; if(newscreenwidth==1024&&newscreenheight==640)whichres=6; if(newscreenwidth==1344&&newscreenheight==840)whichres=7; + if(newscreenwidth==1920&&newscreenheight==1200)whichres=8; - if(whichres==-1||whichres==7){ + if(whichres==-1||whichres==8){ newscreenwidth=640; newscreenheight=480; } @@ -2149,6 +2150,10 @@ void Game::Tick() newscreenwidth=1344; newscreenheight=840; } + if(whichres==7){ + newscreenwidth=1920; + newscreenheight=1200; + } } if(Button()&&!oldbutton&&selected==1){ newdetail++; diff --git a/Source/OpenGL_Windows.cpp b/Source/OpenGL_Windows.cpp index 0eae638..9b0dfad 100644 --- a/Source/OpenGL_Windows.cpp +++ b/Source/OpenGL_Windows.cpp @@ -2193,6 +2193,7 @@ int main(int argc, char **argv) if(width==840 && height==524)whichres=5; if(width==1024 && height==640)whichres=6; if(width==1344 && height==840)whichres=7; + if(width==1920 && height==1200)whichres=8; return whichres; } @@ -2209,6 +2210,7 @@ int main(int argc, char **argv) if(width==840 && height==524)whichres=5; if(width==1024 && height==640)whichres=6; if(width==1344 && height==840)whichres=7; + if(width>=1920 && height>=1200)whichres=8; return whichres; } @@ -2220,7 +2222,7 @@ int main(int argc, char **argv) while (true) { - if(whichres<=0 || whichres>7){ + if(whichres<=0 || whichres>8){ whichres = 0; width=640; height=480; @@ -2253,6 +2255,16 @@ int main(int argc, char **argv) width=1344; height=840; } + if(whichres==8){ + width=1920; + height=1200; + } + + // currently with SDL, we just use whatever the native bitdepth + // of the display is and don't care. + #if USE_SDL + break; + #endif if ((detail != 0) && (resolutionDepths[whichres][1] != 0)) { @@ -2268,7 +2280,9 @@ int main(int argc, char **argv) detail = 0; break; } - else if (0 == whichres) + else + + if (0 == whichres) { break; } -- 2.39.2