From 99df21c90167e2828774cf648745af1cc9562c50 Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Mon, 19 Feb 2007 23:48:52 +0000 Subject: [PATCH] - Fixed: Playing a demo in windowed mode no longer grabs the mouse. SVN r487 (trunk) --- docs/rh-log.txt | 3 +++ src/sdl/i_input.cpp | 2 +- src/win32/i_input.cpp | 4 ++-- zdoom.sln | 8 ++++++++ 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/docs/rh-log.txt b/docs/rh-log.txt index 8e0cdb59c..ba21019f8 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,3 +1,6 @@ +February 19, 2007 +- Fixed: Playing a demo in windowed mode no longer grabs the mouse. + February 14, 2007 - Added two new net commands: DEM_WIPEON and DEM_WIPEOFF. They keep track of when a player is going through a screen wipe and act like a pause, so the diff --git a/src/sdl/i_input.cpp b/src/sdl/i_input.cpp index 8bce0630c..fe8b03796 100644 --- a/src/sdl/i_input.cpp +++ b/src/sdl/i_input.cpp @@ -284,7 +284,7 @@ static void I_CheckNativeMouse () == (SDL_APPINPUTFOCUS|SDL_APPACTIVE); bool fs = (SDL_GetVideoSurface ()->flags & SDL_FULLSCREEN) != 0; - bool wantNative = !focus || !use_mouse || (!fs && (GUICapture || paused)); + bool wantNative = !focus || !use_mouse || (!fs && (GUICapture || paused || demoplayback)); if (wantNative != NativeMouse) { diff --git a/src/win32/i_input.cpp b/src/win32/i_input.cpp index fa395ccda..5295ab1bc 100644 --- a/src/win32/i_input.cpp +++ b/src/win32/i_input.cpp @@ -418,7 +418,7 @@ static void I_CheckGUICapture () void I_CheckNativeMouse (bool preferNative) { bool wantNative = !HaveFocus || - ((!screen || !screen->IsFullscreen()) && (GUICapture || paused || preferNative || !use_mouse)); + ((!screen || !screen->IsFullscreen()) && (GUICapture || paused || preferNative || !use_mouse || demoplayback)); // Printf ("%d -> %d\n", NativeMouse, wantNative); if (wantNative != NativeMouse) @@ -470,7 +470,7 @@ LRESULT CALLBACK WndProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) break; case WM_PAINT: - if (screen != NULL) + if (screen != NULL && 0) { static_cast (screen)->PaintToWindow (); } diff --git a/zdoom.sln b/zdoom.sln index 7705de308..a188e5350 100644 --- a/zdoom.sln +++ b/zdoom.sln @@ -45,6 +45,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jpeg-6b", "jpeg-6b\jpeg-6b. EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fixrtext", "tools\fixrtext\fixrtext.vcproj", "{DA47396F-60C1-4BDE-A977-7F7DE461CF77}" EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mediahelper", "mediahelper\mediahelper.vcproj", "{B775D890-D329-4173-9DBA-7361334A23FB}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 @@ -145,6 +147,12 @@ Global {DA47396F-60C1-4BDE-A977-7F7DE461CF77}.Release|Win32.ActiveCfg = Release|Win32 {DA47396F-60C1-4BDE-A977-7F7DE461CF77}.Release|Win32.Build.0 = Release|Win32 {DA47396F-60C1-4BDE-A977-7F7DE461CF77}.Release|x64.ActiveCfg = Release|Win32 + {B775D890-D329-4173-9DBA-7361334A23FB}.Debug|Win32.ActiveCfg = Debug|Win32 + {B775D890-D329-4173-9DBA-7361334A23FB}.Debug|Win32.Build.0 = Debug|Win32 + {B775D890-D329-4173-9DBA-7361334A23FB}.Debug|x64.ActiveCfg = Debug|Win32 + {B775D890-D329-4173-9DBA-7361334A23FB}.Release|Win32.ActiveCfg = Release|Win32 + {B775D890-D329-4173-9DBA-7361334A23FB}.Release|Win32.Build.0 = Release|Win32 + {B775D890-D329-4173-9DBA-7361334A23FB}.Release|x64.ActiveCfg = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE