Re #409 Fixed non-working display settings not being fully erased when the game restarts
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@3723 30fe4595-0a0c-4342-8851-515496e4dcbd Former-commit-id: 5311f2590877088d71a79428f47c03592b645acb Former-commit-id: 9307185c68bf14ba35ff7fe888890522a19d345b
This commit is contained in:
parent
634cc98efb
commit
9218754133
2 changed files with 7 additions and 4 deletions
|
@ -207,6 +207,7 @@ bool GfglFeatures::detectBestSupport(int& nWidth, int& nHeight, int& nDepth,
|
|||
while (!pWinSurface && nMaxMultiSamples > 1)
|
||||
{
|
||||
// Set the anti-aliasing attributes and setup the video mode.
|
||||
GfLogTrace("Trying %dx anti-aliasing\n", nMaxMultiSamples);
|
||||
SDL_GL_SetAttribute(SDL_GL_MULTISAMPLEBUFFERS, 1);
|
||||
SDL_GL_SetAttribute(SDL_GL_MULTISAMPLESAMPLES, nMaxMultiSamples);
|
||||
pWinSurface = SDL_SetVideoMode(nWidth, nHeight, nCurrDepth, bfVideoMode);
|
||||
|
|
|
@ -396,7 +396,7 @@ bool GfScrInit(void)
|
|||
// 2) Check / update test state of any 'in-test' specs.
|
||||
if (GfParmExistsSection(hparmScreen, GFSCR_SECT_INTESTPROPS))
|
||||
{
|
||||
// Remove the 'in-test' specs if the test failed (we are stil in the 'in progress'
|
||||
// Remove the 'in-test' specs if the test failed (we are still in the 'in progress'
|
||||
// test state because the game crashed during the test).
|
||||
if (std::string(GfParmGetStr(hparmScreen, GFSCR_SECT_INTESTPROPS, GFSCR_ATT_TESTSTATE,
|
||||
GFSCR_VAL_INPROGRESS)) == GFSCR_VAL_INPROGRESS)
|
||||
|
@ -405,15 +405,17 @@ bool GfScrInit(void)
|
|||
GfParmRemoveSection(hparmScreen, GFSCR_SECT_INTESTPROPS);
|
||||
}
|
||||
|
||||
// If the test has not yet been done, mark it as in-progress
|
||||
// and write the config file to disk, in case the test makes the game crash.
|
||||
// If the test has not yet been done, mark it as 'in progress'
|
||||
else
|
||||
{
|
||||
GfLogInfo("Testing new screen specs : let's see what's happening ...\n");
|
||||
GfParmSetStr(hparmScreen, GFSCR_SECT_INTESTPROPS, GFSCR_ATT_TESTSTATE,
|
||||
GFSCR_VAL_INPROGRESS);
|
||||
GfParmWriteFile(NULL, hparmScreen, "Screen");
|
||||
}
|
||||
|
||||
// Write the config file to disk (in case the forthcoming test makes the game crash,
|
||||
// or in order the Options / Display menu shows the actual current settings).
|
||||
GfParmWriteFile(NULL, hparmScreen, "Screen");
|
||||
}
|
||||
|
||||
// 3) Select the 'in-test' specs if present, otherwise the 'validated' ones.
|
||||
|
|
Loading…
Reference in a new issue