diff options
author | erorcun <erorcunerorcun@hotmail.com.tr> | 2020-10-18 18:16:37 +0200 |
---|---|---|
committer | erorcun <erorcunerorcun@hotmail.com.tr> | 2020-10-18 18:16:37 +0200 |
commit | a6aa782d6d5fa9a2165dafec5794a2e2cfbc653f (patch) | |
tree | dea344ffa5b7073b94b94a35dee13519fbc04b82 /src/skel | |
parent | Upload to bintray when creating tags (diff) | |
download | re3-a6aa782d6d5fa9a2165dafec5794a2e2cfbc653f.tar re3-a6aa782d6d5fa9a2165dafec5794a2e2cfbc653f.tar.gz re3-a6aa782d6d5fa9a2165dafec5794a2e2cfbc653f.tar.bz2 re3-a6aa782d6d5fa9a2165dafec5794a2e2cfbc653f.tar.lz re3-a6aa782d6d5fa9a2165dafec5794a2e2cfbc653f.tar.xz re3-a6aa782d6d5fa9a2165dafec5794a2e2cfbc653f.tar.zst re3-a6aa782d6d5fa9a2165dafec5794a2e2cfbc653f.zip |
Diffstat (limited to '')
-rw-r--r-- | src/skel/glfw/glfw.cpp | 15 | ||||
-rw-r--r-- | src/skel/win/win.cpp | 18 |
2 files changed, 24 insertions, 9 deletions
diff --git a/src/skel/glfw/glfw.cpp b/src/skel/glfw/glfw.cpp index cdb73992..4d41a900 100644 --- a/src/skel/glfw/glfw.cpp +++ b/src/skel/glfw/glfw.cpp @@ -418,7 +418,7 @@ psInitialize(void) } else if ( verInfo.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS ) { - if ( verInfo.dwMajorVersion > 4 || verInfo.dwMajorVersion == 4 && verInfo.dwMinorVersion == 1 ) + if ( verInfo.dwMajorVersion > 4 || verInfo.dwMajorVersion == 4 && verInfo.dwMinorVersion != 0 ) { debug("Operating System is Win98\n"); _dwOperatingSystemVersion = OS_WIN98; @@ -1220,14 +1220,17 @@ void resizeCB(GLFWwindow* window, int width, int height) { * memory things don't work. */ /* redraw window */ - if (RwInitialised && (gGameState == GS_PLAYING_GAME #ifndef MASTER - || gGameState == GS_ANIMVIEWER -#endif - )) + if (RwInitialised && (gGameState == GS_PLAYING_GAME || gGameState == GS_ANIMVIEWER)) { - RsEventHandler((gGameState == GS_PLAYING_GAME ? rsIDLE : rsANIMVIEWER), (void*)TRUE); + RsEventHandler((gGameState == GS_PLAYING_GAME ? rsIDLE : rsANIMVIEWER), (void *)TRUE); } +#else + if (RwInitialised && gGameState == GS_PLAYING_GAME) + { + RsEventHandler(rsIDLE, (void *)TRUE); + } +#endif if (RwInitialised && height > 0 && width > 0) { RwRect r; diff --git a/src/skel/win/win.cpp b/src/skel/win/win.cpp index ac46d23a..9effaa31 100644 --- a/src/skel/win/win.cpp +++ b/src/skel/win/win.cpp @@ -684,7 +684,7 @@ psInitialize(void) } else if ( verInfo.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS ) { - if ( verInfo.dwMajorVersion > 4 || verInfo.dwMajorVersion == 4 && verInfo.dwMinorVersion == 1 ) + if ( verInfo.dwMajorVersion > 4 || verInfo.dwMajorVersion == 4 && verInfo.dwMinorVersion != 0 ) { debug("Operating System is Win98\n"); _dwOperatingSystemVersion = OS_WIN98; @@ -1012,11 +1012,17 @@ MainWndProc(HWND window, UINT message, WPARAM wParam, LPARAM lParam) RECT rect; /* redraw window */ +#ifndef MASTER if (RwInitialised && (gGameState == GS_PLAYING_GAME || gGameState == GS_ANIMVIEWER)) { RsEventHandler((gGameState == GS_PLAYING_GAME ? rsIDLE : rsANIMVIEWER), (void *)TRUE); } - +#else + if (RwInitialised && gGameState == GS_PLAYING_GAME) + { + RsEventHandler(rsIDLE, (void *)TRUE); + } +#endif /* Manually resize window */ rect.left = rect.top = 0; rect.bottom = newPos->bottom - newPos->top; @@ -1369,14 +1375,20 @@ UINT GetBestRefreshRate(UINT width, UINT height, UINT depth) #endif if ( mode.Width == width && mode.Height == height && mode.Format == format ) { - if ( mode.RefreshRate == 0 ) + if ( mode.RefreshRate == 0 ) { + // From VC +#ifdef FIX_BUGS + d3d->Release(); +#endif return 0; + } if ( mode.RefreshRate < refreshRate && mode.RefreshRate >= 60 ) refreshRate = mode.RefreshRate; } } + // From VC #ifdef FIX_BUGS d3d->Release(); #endif |