if(newdetail>2)newdetail=detail;
if(newdetail<0)newdetail=detail;
+#if !USE_SDL // we'll take anything that works.
if(newscreenwidth>3000)newscreenwidth=screenwidth;
- if(newscreenwidth<0)newscreenwidth=screenwidth;
if(newscreenheight>3000)newscreenheight=screenheight;
+#endif
+ if(newscreenwidth<0)newscreenwidth=screenwidth;
if(newscreenheight<0)newscreenheight=screenheight;
ofstream opstream(ConvertFileName(":Data:config.txt", "w"));
FSOUND_Sample_SetMinMaxDistance(samp[firestartsound], 8.0f, 2000.0f);
}
if(Button()&&!oldbutton&&selected==0){
+ #if USE_SDL
+ extern SDL_Rect **resolutions;
+ bool isCustomResolution = true;
+ bool found = false;
+ for (int i = 0; (!found) && (resolutions[i]); i++)
+ {
+ if ((resolutions[i]->w == screenwidth) && (resolutions[i]->h == screenwidth))
+ isCustomResolution = false;
+
+ if ((resolutions[i]->w == newscreenwidth) && (resolutions[i]->h == newscreenheight))
+ {
+ i++;
+ if (resolutions[i] != NULL)
+ {
+ newscreenwidth = (int) resolutions[i]->w;
+ newscreenheight = (int) resolutions[i]->h;
+ }
+ else if (isCustomResolution)
+ {
+ if ((screenwidth == newscreenwidth) && (screenheight == newscreenheight))
+ {
+ newscreenwidth = (int) resolutions[0]->w;
+ newscreenheight = (int) resolutions[0]->h;
+ }
+ else
+ {
+ newscreenwidth = screenwidth;
+ newscreenheight = screenheight;
+ }
+ }
+ else
+ {
+ newscreenwidth = (int) resolutions[0]->w;
+ newscreenheight = (int) resolutions[0]->h;
+ }
+ found = true;
+ }
+ }
+
+ if (!found)
+ {
+ newscreenwidth = (int) resolutions[0]->w;
+ newscreenheight = (int) resolutions[0]->h;
+ }
+
+ #else
int whichres;
whichres=-1;
if(newscreenwidth==640&&newscreenheight==480)whichres=0;
newscreenwidth=1920;
newscreenheight=1200;
}
+ #endif
}
if(Button()&&!oldbutton&&selected==1){
newdetail++;
if(newdetail>2)newdetail=detail;
if(newdetail<0)newdetail=detail;
+#if !USE_SDL // we'll take anything that works.
if(newscreenwidth>3000)newscreenwidth=screenwidth;
- if(newscreenwidth<0)newscreenwidth=screenwidth;
if(newscreenheight>3000)newscreenheight=screenheight;
+#endif
+ if(newscreenwidth<0)newscreenwidth=screenwidth;
if(newscreenheight<0)newscreenheight=screenheight;
if(mainmenu==3){
if(newdetail>2)newdetail=detail;
if(newdetail<0)newdetail=detail;
+#if !USE_SDL // we'll take anything that works.
if(newscreenwidth>3000)newscreenwidth=screenwidth;
- if(newscreenwidth<0)newscreenwidth=screenwidth;
if(newscreenheight>3000)newscreenheight=screenheight;
+#endif
+ if(newscreenwidth<0)newscreenwidth=screenwidth;
if(newscreenheight<0)newscreenheight=screenheight;
ofstream opstream(ConvertFileName(":Data:config.txt", "w"));
if(displaychars[0]){
char serialstring[256];
char tempstring[256];
+ #if defined(__APPLE__)
+ sprintf (tempstring, "%s", registrationname);
+ #elif defined(_MSC_VER) || defined(__linux__)
sprintf (tempstring, "%s-windows", registrationname);
+ #else
+ #error Please make sure you have the right registration key stuff here!
+ #endif
long num1;
long num2;
long num3;
if(mainmenu==3){
if(newdetail>2)newdetail=detail;
if(newdetail<0)newdetail=detail;
+#if !USE_SDL // we'll take anything that works.
if(newscreenwidth>3000)newscreenwidth=screenwidth;
- if(newscreenwidth<0)newscreenwidth=screenwidth;
if(newscreenheight>3000)newscreenheight=screenheight;
+#endif
+ if(newscreenwidth<0)newscreenwidth=screenwidth;
if(newscreenheight<0)newscreenheight=screenheight;
ofstream opstream(ConvertFileName(":Data:config.txt", "w"));