From 781617d484ae7f7966ee7d3f1abe557c9ad9230c Mon Sep 17 00:00:00 2001 From: withmorten Date: Thu, 18 Feb 2021 22:55:26 +0100 Subject: add NoMovies ini option, rename gDrawVersionText, always save ini after loading --- src/skel/win/win.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'src/skel/win/win.cpp') diff --git a/src/skel/win/win.cpp b/src/skel/win/win.cpp index 89c901b2..21bd0eb0 100644 --- a/src/skel/win/win.cpp +++ b/src/skel/win/win.cpp @@ -2273,7 +2273,7 @@ WinMain(HINSTANCE instance, case GS_START_UP: { #ifdef NO_MOVIES - gGameState = GS_INIT_ONCE; + gGameState = gbNoMovies ? GS_INIT_ONCE : GS_INIT_LOGO_MPEG; #else gGameState = GS_INIT_LOGO_MPEG; #endif @@ -2314,8 +2314,11 @@ WinMain(HINSTANCE instance, case GS_INIT_INTRO_MPEG: { -#ifndef NO_MOVIES +#ifdef NO_MOVIES + if (!gbNoMovies) +#endif CloseClip(); +#ifndef FIX_BUGS CoUninitialize(); #endif @@ -2353,8 +2356,11 @@ WinMain(HINSTANCE instance, case GS_INIT_ONCE: { -#ifndef NO_MOVIES +#ifdef NO_MOVIES + if (!gbNoMovies) +#endif CloseClip(); +#ifndef FIX_BUGS CoUninitialize(); #endif -- cgit v1.2.3 From d506f8588c759548f9e5d120c3d549af5cdfe66b Mon Sep 17 00:00:00 2001 From: Haydn Trigg Date: Sun, 21 Feb 2021 11:38:32 +0000 Subject: Fix stack corruption in HandleGraphEvent --- src/skel/win/win.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/skel/win/win.cpp') diff --git a/src/skel/win/win.cpp b/src/skel/win/win.cpp index 21bd0eb0..acaea28d 100644 --- a/src/skel/win/win.cpp +++ b/src/skel/win/win.cpp @@ -915,14 +915,14 @@ void WaitForState(FILTER_STATE State) */ void HandleGraphEvent(void) { - LONG evCode, evParam1, evParam2; + LONG evCode; + LONG_PTR evParam1, evParam2; HRESULT hr=S_OK; ASSERT(pME != nil); // Process all queued events - while (SUCCEEDED(pME->GetEvent(&evCode, (LONG_PTR *)&evParam1, - (LONG_PTR *)&evParam2, 0))) + while (SUCCEEDED(pME->GetEvent(&evCode, &evParam1, &evParam2, 0))) { // Free memory associated with callback, since we're not using it hr = pME->FreeEventParams(evCode, evParam1, evParam2); -- cgit v1.2.3