summaryrefslogtreecommitdiff
path: root/src/skel/win/win.cpp
diff options
context:
space:
mode:
authorerorcun <erorcunerorcun@hotmail.com.tr>2020-10-18 19:16:37 +0300
committererorcun <erorcunerorcun@hotmail.com.tr>2020-10-18 19:16:37 +0300
commita6aa782d6d5fa9a2165dafec5794a2e2cfbc653f (patch)
treedea344ffa5b7073b94b94a35dee13519fbc04b82 /src/skel/win/win.cpp
parent4c305fd48bda02eabf56ca948bdab02ed9867362 (diff)
Fixes and style changes from miami
Diffstat (limited to 'src/skel/win/win.cpp')
-rw-r--r--src/skel/win/win.cpp18
1 files changed, 15 insertions, 3 deletions
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