diff --git a/docs/rh-log.txt b/docs/rh-log.txt index 2edf84519..588a3dc8a 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,4 +1,13 @@ December 8, 2007 +- Fixed: When the game starts with the net pane open, the abort button + receives the input focus. When the pane is closed, the focus doesn't + return to any window, so even though the window is still active, it no + longer has the focus and does not receive input events. +- Fixed: The network synch timer was still left running after the game + started. (Windows only) +- Fixed: When a player leaves the game at the exact moment they are being + damaged, the game could crash because their actor still had a valid player + pointer, but the player's mo pointer had been NULLed. - Fixed: MAPINFO is parsed before the text colors are read, so the TextColor option for skills wouldn't work. - Changed the PowerTimeFreezer "blink" effect back to checking against diff --git a/src/d_net.cpp b/src/d_net.cpp index e215e7d85..f6ba0ba0c 100644 --- a/src/d_net.cpp +++ b/src/d_net.cpp @@ -630,6 +630,7 @@ void PlayerIsGone (int netnode, int netconsole) if (players[netconsole].mo != NULL) { P_DisconnectEffect (players[netconsole].mo); + players[netconsole].mo->player = NULL; players[netconsole].mo->Destroy (); players[netconsole].mo = NULL; players[netconsole].camera = NULL; diff --git a/src/win32/hardware.cpp b/src/win32/hardware.cpp index 20febd73a..ff67fd3c3 100644 --- a/src/win32/hardware.cpp +++ b/src/win32/hardware.cpp @@ -70,6 +70,22 @@ void I_InitGraphics () { UCVarValue val; + // If the focus window is destroyed, it doesn't go back to the active window. + // (e.g. because the net pane was up, and a button on it had focus) + if (GetFocus() == NULL && GetActiveWindow() == Window) + { + // Make sure it's in the foreground and focused. (It probably is + // already foregrounded but may not be focused.) + SetForegroundWindow(Window); + SetFocus(Window); + // Note that when I start a 2-player game on the same machine, the + // window for the game that isn't focused, active, or foregrounded + // still receives a WM_ACTIVATEAPP message telling it that it's the + // active window. The window that is really the active window does + // not receive a WM_ACTIVATEAPP message, so both games think they + // are the active app. Huh? + } + val.Bool = !!Args.CheckParm ("-devparm"); ticker.SetGenericRepDefault (val, CVAR_Bool); Video = new Win32Video (0); diff --git a/src/win32/i_input.cpp b/src/win32/i_input.cpp index 5295ab1bc..812601dd1 100644 --- a/src/win32/i_input.cpp +++ b/src/win32/i_input.cpp @@ -420,7 +420,8 @@ void I_CheckNativeMouse (bool preferNative) bool wantNative = !HaveFocus || ((!screen || !screen->IsFullscreen()) && (GUICapture || paused || preferNative || !use_mouse || demoplayback)); -// Printf ("%d -> %d\n", NativeMouse, wantNative); + //Printf ("%d %d %d %d\n", HaveFocus, GetFocus() == Window, AppActive, GetForegroundWindow() == Window); + if (wantNative != NativeMouse) { NativeMouse = wantNative; diff --git a/src/win32/st_start.cpp b/src/win32/st_start.cpp index db7124bb0..ff83f00d7 100644 --- a/src/win32/st_start.cpp +++ b/src/win32/st_start.cpp @@ -383,6 +383,7 @@ FBasicStartupScreen::~FBasicStartupScreen() ProgressBar = NULL; LayoutMainWindow (Window, NULL); } + KillTimer(Window, 1337); } //==========================================================================