OPTVAL_PURE_IF_POSSIBLE persistence even if you're in a high-res GL mode

git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@2124 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
mcmartin
2005-12-26 17:11:39 +00:00
parent 724e1b0694
commit bae1772ed1
3 changed files with 29 additions and 10 deletions
+2
View File
@@ -1,4 +1,6 @@
Changes towards version 0.5:
- Split config.alwaysgl and config.usegl so that "Use Pure Mode If Possible"
persists across runs even when using a GL mode - Michael
- Fixed Yehat Rebel left hand doubling up problem (bug #807) - Alex
- Fixed the problem with Melnorme stripping Chmmr bomb/crystal
modules from the ship in a fuel deal (bug #803) - Alex
+18 -8
View File
@@ -841,17 +841,18 @@ GetGlobalOptions (GLOBALOPTS *opts)
break;
}
/* Work out resolution. On the way, try to guess a good default
* for config.alwaysgl, then overwrite it if it was set previously. */
opts->driver = OPTVAL_PURE_IF_POSSIBLE;
switch (ScreenWidthActual)
{
case 320:
if (GraphicsDriver == TFB_GFXDRIVER_SDL_PURE)
{
opts->res = OPTVAL_320_240;
opts->driver = OPTVAL_PURE_IF_POSSIBLE;
}
else
{
opts->driver = OPTVAL_ALWAYS_GL;
if (ScreenHeightActual != 240)
{
opts->res = OPTVAL_CUSTOM;
@@ -859,6 +860,7 @@ GetGlobalOptions (GLOBALOPTS *opts)
else
{
opts->res = OPTVAL_320_240;
opts->driver = OPTVAL_ALWAYS_GL;
}
}
break;
@@ -866,11 +868,9 @@ GetGlobalOptions (GLOBALOPTS *opts)
if (GraphicsDriver == TFB_GFXDRIVER_SDL_PURE)
{
opts->res = OPTVAL_640_480;
opts->driver = OPTVAL_PURE_IF_POSSIBLE;
}
else
{
opts->driver = OPTVAL_ALWAYS_GL;
if (ScreenHeightActual != 480)
{
opts->res = OPTVAL_CUSTOM;
@@ -878,11 +878,11 @@ GetGlobalOptions (GLOBALOPTS *opts)
else
{
opts->res = OPTVAL_640_480;
opts->driver = OPTVAL_ALWAYS_GL;
}
}
break;
case 800:
opts->driver = OPTVAL_ALWAYS_GL;
if (ScreenHeightActual != 600)
{
opts->res = OPTVAL_CUSTOM;
@@ -893,7 +893,6 @@ GetGlobalOptions (GLOBALOPTS *opts)
}
break;
case 1024:
opts->driver = OPTVAL_ALWAYS_GL;
if (ScreenHeightActual != 768)
{
opts->res = OPTVAL_CUSTOM;
@@ -904,11 +903,22 @@ GetGlobalOptions (GLOBALOPTS *opts)
}
break;
default:
opts->driver = OPTVAL_ALWAYS_GL;
opts->res = OPTVAL_CUSTOM;
break;
}
if (res_HasKey ("config.alwaysgl"))
{
if (res_GetBoolean ("config.alwaysgl"))
{
opts->driver = OPTVAL_ALWAYS_GL;
}
else
{
opts->driver = OPTVAL_PURE_IF_POSSIBLE;
}
}
opts->musicvol = (((int)(musicVolumeScale * 100.0f) + 2) / 5) * 5;
opts->sfxvol = (((int)(sfxVolumeScale * 100.0f) + 2) / 5) * 5;
opts->speechvol = (((int)(speechVolumeScale * 100.0f) + 2) / 5) * 5;
@@ -978,7 +988,7 @@ SetGlobalOptions (GLOBALOPTS *opts)
res_PutInteger ("config.resheight", NewHeight);
res_PutInteger ("config.bpp", NewDepth);
res_PutBoolean ("config.alwaysgl", opts->driver == OPTVAL_ALWAYS_GL);
res_PutBoolean ("config.usegl", NewDriver == TFB_GFXDRIVER_SDL_OPENGL);
switch (opts->scaler) {
case OPTVAL_BILINEAR_SCALE:
+9 -2
View File
@@ -191,8 +191,15 @@ main (int argc, char *argv[])
}
if (res_HasKey ("config.alwaysgl"))
{
options.gfxDriver = res_GetBoolean ("config.alwaysgl") ?
TFB_GFXDRIVER_SDL_OPENGL : TFB_GFXDRIVER_SDL_PURE;
if (res_GetBoolean ("config.alwaysgl"))
{
options.gfxDriver = TFB_GFXDRIVER_SDL_OPENGL;
}
}
if (res_HasKey ("config.usegl"))
{
options.gfxDriver = res_GetBoolean ("config.usegl") ? TFB_GFXDRIVER_SDL_OPENGL :
TFB_GFXDRIVER_SDL_PURE;
}
if (res_HasKey ("config.scaler"))
{