From 9218754133bfbad78f2ddb6772eccc0c6c56bb12 Mon Sep 17 00:00:00 2001 From: pouillot Date: Fri, 15 Jul 2011 11:08:06 +0000 Subject: [PATCH] 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 --- src/libs/tgfclient/glfeatures.cpp | 1 + src/libs/tgfclient/guiscreen.cpp | 10 ++++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/libs/tgfclient/glfeatures.cpp b/src/libs/tgfclient/glfeatures.cpp index 2515277f0..25a999f86 100644 --- a/src/libs/tgfclient/glfeatures.cpp +++ b/src/libs/tgfclient/glfeatures.cpp @@ -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); diff --git a/src/libs/tgfclient/guiscreen.cpp b/src/libs/tgfclient/guiscreen.cpp index 7b32cb115..051e1138f 100644 --- a/src/libs/tgfclient/guiscreen.cpp +++ b/src/libs/tgfclient/guiscreen.cpp @@ -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.