diff options
author | aap <aap@papnet.eu> | 2020-08-08 17:40:17 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-08 17:40:17 +0200 |
commit | bad2b4b3c288c242e9335e0c7f35dab3385e3a1d (patch) | |
tree | 596ae1bdcc12851a651c71da68cd663597e159bb /src | |
parent | Merge pull request #678 from blingu/master (diff) | |
parent | don't CoUninitialize for NO_MOVIES (diff) | |
download | re3-bad2b4b3c288c242e9335e0c7f35dab3385e3a1d.tar re3-bad2b4b3c288c242e9335e0c7f35dab3385e3a1d.tar.gz re3-bad2b4b3c288c242e9335e0c7f35dab3385e3a1d.tar.bz2 re3-bad2b4b3c288c242e9335e0c7f35dab3385e3a1d.tar.lz re3-bad2b4b3c288c242e9335e0c7f35dab3385e3a1d.tar.xz re3-bad2b4b3c288c242e9335e0c7f35dab3385e3a1d.tar.zst re3-bad2b4b3c288c242e9335e0c7f35dab3385e3a1d.zip |
Diffstat (limited to 'src')
-rw-r--r-- | src/skel/win/win.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/skel/win/win.cpp b/src/skel/win/win.cpp index 5c5c7ece..cf4749b1 100644 --- a/src/skel/win/win.cpp +++ b/src/skel/win/win.cpp @@ -1851,7 +1851,11 @@ void PlayMovieInWindow(int cmdShow, const char* szFile) MultiByteToWideChar(CP_ACP, 0, szFile, -1, wFileName, sizeof(wFileName) - 1); // Initialize COM +#ifdef FIX_BUGS // will also return S_FALSE if it has already been inited in the same thread + CoInitialize(nil); +#else JIF(CoInitialize(nil)); +#endif // Get the interface for DirectShow's GraphBuilder JIF(CoCreateInstance(CLSID_FilterGraph, nil, CLSCTX_INPROC, @@ -2223,9 +2227,10 @@ WinMain(HINSTANCE instance, case GS_INIT_INTRO_MPEG: { +#ifndef NO_MOVIES CloseClip(); - CoUninitialize(); +#endif if ( CMenuManager::OS_Language == LANG_FRENCH || CMenuManager::OS_Language == LANG_GERMAN ) PlayMovieInWindow(cmdShow, "movies\\GTAtitlesGER.mpg"); @@ -2259,8 +2264,10 @@ WinMain(HINSTANCE instance, case GS_INIT_ONCE: { +#ifndef NO_MOVIES CloseClip(); CoUninitialize(); +#endif #ifdef FIX_BUGS // draw one frame because otherwise we'll end up looking at black screen for a while if vsync is on |