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:
@@ -1,4 +1,6 @@
|
|||||||
Changes towards version 0.5:
|
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 Yehat Rebel left hand doubling up problem (bug #807) - Alex
|
||||||
- Fixed the problem with Melnorme stripping Chmmr bomb/crystal
|
- Fixed the problem with Melnorme stripping Chmmr bomb/crystal
|
||||||
modules from the ship in a fuel deal (bug #803) - Alex
|
modules from the ship in a fuel deal (bug #803) - Alex
|
||||||
|
|||||||
@@ -841,17 +841,18 @@ GetGlobalOptions (GLOBALOPTS *opts)
|
|||||||
break;
|
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)
|
switch (ScreenWidthActual)
|
||||||
{
|
{
|
||||||
case 320:
|
case 320:
|
||||||
if (GraphicsDriver == TFB_GFXDRIVER_SDL_PURE)
|
if (GraphicsDriver == TFB_GFXDRIVER_SDL_PURE)
|
||||||
{
|
{
|
||||||
opts->res = OPTVAL_320_240;
|
opts->res = OPTVAL_320_240;
|
||||||
opts->driver = OPTVAL_PURE_IF_POSSIBLE;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
opts->driver = OPTVAL_ALWAYS_GL;
|
|
||||||
if (ScreenHeightActual != 240)
|
if (ScreenHeightActual != 240)
|
||||||
{
|
{
|
||||||
opts->res = OPTVAL_CUSTOM;
|
opts->res = OPTVAL_CUSTOM;
|
||||||
@@ -859,6 +860,7 @@ GetGlobalOptions (GLOBALOPTS *opts)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
opts->res = OPTVAL_320_240;
|
opts->res = OPTVAL_320_240;
|
||||||
|
opts->driver = OPTVAL_ALWAYS_GL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -866,11 +868,9 @@ GetGlobalOptions (GLOBALOPTS *opts)
|
|||||||
if (GraphicsDriver == TFB_GFXDRIVER_SDL_PURE)
|
if (GraphicsDriver == TFB_GFXDRIVER_SDL_PURE)
|
||||||
{
|
{
|
||||||
opts->res = OPTVAL_640_480;
|
opts->res = OPTVAL_640_480;
|
||||||
opts->driver = OPTVAL_PURE_IF_POSSIBLE;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
opts->driver = OPTVAL_ALWAYS_GL;
|
|
||||||
if (ScreenHeightActual != 480)
|
if (ScreenHeightActual != 480)
|
||||||
{
|
{
|
||||||
opts->res = OPTVAL_CUSTOM;
|
opts->res = OPTVAL_CUSTOM;
|
||||||
@@ -878,11 +878,11 @@ GetGlobalOptions (GLOBALOPTS *opts)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
opts->res = OPTVAL_640_480;
|
opts->res = OPTVAL_640_480;
|
||||||
|
opts->driver = OPTVAL_ALWAYS_GL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 800:
|
case 800:
|
||||||
opts->driver = OPTVAL_ALWAYS_GL;
|
|
||||||
if (ScreenHeightActual != 600)
|
if (ScreenHeightActual != 600)
|
||||||
{
|
{
|
||||||
opts->res = OPTVAL_CUSTOM;
|
opts->res = OPTVAL_CUSTOM;
|
||||||
@@ -893,7 +893,6 @@ GetGlobalOptions (GLOBALOPTS *opts)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 1024:
|
case 1024:
|
||||||
opts->driver = OPTVAL_ALWAYS_GL;
|
|
||||||
if (ScreenHeightActual != 768)
|
if (ScreenHeightActual != 768)
|
||||||
{
|
{
|
||||||
opts->res = OPTVAL_CUSTOM;
|
opts->res = OPTVAL_CUSTOM;
|
||||||
@@ -904,11 +903,22 @@ GetGlobalOptions (GLOBALOPTS *opts)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
opts->driver = OPTVAL_ALWAYS_GL;
|
|
||||||
opts->res = OPTVAL_CUSTOM;
|
opts->res = OPTVAL_CUSTOM;
|
||||||
break;
|
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->musicvol = (((int)(musicVolumeScale * 100.0f) + 2) / 5) * 5;
|
||||||
opts->sfxvol = (((int)(sfxVolumeScale * 100.0f) + 2) / 5) * 5;
|
opts->sfxvol = (((int)(sfxVolumeScale * 100.0f) + 2) / 5) * 5;
|
||||||
opts->speechvol = (((int)(speechVolumeScale * 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.resheight", NewHeight);
|
||||||
res_PutInteger ("config.bpp", NewDepth);
|
res_PutInteger ("config.bpp", NewDepth);
|
||||||
res_PutBoolean ("config.alwaysgl", opts->driver == OPTVAL_ALWAYS_GL);
|
res_PutBoolean ("config.alwaysgl", opts->driver == OPTVAL_ALWAYS_GL);
|
||||||
|
res_PutBoolean ("config.usegl", NewDriver == TFB_GFXDRIVER_SDL_OPENGL);
|
||||||
|
|
||||||
switch (opts->scaler) {
|
switch (opts->scaler) {
|
||||||
case OPTVAL_BILINEAR_SCALE:
|
case OPTVAL_BILINEAR_SCALE:
|
||||||
|
|||||||
+9
-2
@@ -191,8 +191,15 @@ main (int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
if (res_HasKey ("config.alwaysgl"))
|
if (res_HasKey ("config.alwaysgl"))
|
||||||
{
|
{
|
||||||
options.gfxDriver = res_GetBoolean ("config.alwaysgl") ?
|
if (res_GetBoolean ("config.alwaysgl"))
|
||||||
TFB_GFXDRIVER_SDL_OPENGL : TFB_GFXDRIVER_SDL_PURE;
|
{
|
||||||
|
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"))
|
if (res_HasKey ("config.scaler"))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user