]> git.jsancho.org Git - lugaru.git/commitdiff
Fixed resolution selection and added 1920x1200 mode for my monitor. :)
authorRyan C. Gordon <icculus@icculus.org>
Tue, 9 Aug 2005 01:21:07 +0000 (01:21 +0000)
committerRyan C. Gordon <icculus@icculus.org>
Tue, 9 Aug 2005 01:21:07 +0000 (01:21 +0000)
Source/GameTick.cpp
Source/OpenGL_Windows.cpp

index de6c79ecf1ed1fd9d0bb80db9ad413ab61351ecd..a12819b2b3559ef196705bc2237f5715c711cbe7 100644 (file)
@@ -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++;
index 0eae638af8864af97cce3cad2c745d07bd9540e7..9b0dfad415062b579e7d2ea87ae9aab4160344ed 100644 (file)
@@ -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;
                        }