summaryrefslogtreecommitdiffstats
path: root/src/skel
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2020-08-10 18:15:51 +0200
committerSergeanur <s.anureev@yandex.ua>2020-08-10 18:15:51 +0200
commit1c1fa25e6cb8b6b49523abf11c88bc4b326668cd (patch)
tree3c595b1c81bb2ffb3390631673af1b3ab30c2bcd /src/skel
parentMerge pull request #677 from majesticCoding/miami (diff)
parentupdate librw (diff)
downloadre3-1c1fa25e6cb8b6b49523abf11c88bc4b326668cd.tar
re3-1c1fa25e6cb8b6b49523abf11c88bc4b326668cd.tar.gz
re3-1c1fa25e6cb8b6b49523abf11c88bc4b326668cd.tar.bz2
re3-1c1fa25e6cb8b6b49523abf11c88bc4b326668cd.tar.lz
re3-1c1fa25e6cb8b6b49523abf11c88bc4b326668cd.tar.xz
re3-1c1fa25e6cb8b6b49523abf11c88bc4b326668cd.tar.zst
re3-1c1fa25e6cb8b6b49523abf11c88bc4b326668cd.zip
Diffstat (limited to 'src/skel')
-rw-r--r--src/skel/glfw/glfw.cpp4
-rw-r--r--src/skel/win/win.cpp9
2 files changed, 12 insertions, 1 deletions
diff --git a/src/skel/glfw/glfw.cpp b/src/skel/glfw/glfw.cpp
index 9a4f2188..0d8361b8 100644
--- a/src/skel/glfw/glfw.cpp
+++ b/src/skel/glfw/glfw.cpp
@@ -213,7 +213,11 @@ double
psTimer(void)
{
struct timespec start;
+#ifdef __linux__
clock_gettime(CLOCK_MONOTONIC_RAW, &start);
+#else
+ clock_gettime(CLOCK_MONOTONIC, &start);
+#endif
return start.tv_sec * 1000.0 + start.tv_nsec/1000000.0;
}
#endif
diff --git a/src/skel/win/win.cpp b/src/skel/win/win.cpp
index 75a3a7c9..f758a7fb 100644
--- a/src/skel/win/win.cpp
+++ b/src/skel/win/win.cpp
@@ -1863,7 +1863,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,
@@ -2233,9 +2237,10 @@ WinMain(HINSTANCE instance,
case GS_INIT_INTRO_MPEG:
{
+#ifndef NO_MOVIES
CloseClip();
-
CoUninitialize();
+#endif
if ( FrontEndMenuManager.OS_Language == LANG_FRENCH || FrontEndMenuManager.OS_Language == LANG_GERMAN )
PlayMovieInWindow(cmdShow, "movies\\GTAtitlesGER.mpg");
@@ -2269,8 +2274,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