summaryrefslogtreecommitdiffstats
path: root/src/skel
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/skel/glfw/glfw.cpp15
-rw-r--r--src/skel/win/win.cpp18
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