- changed the place where the CheckRequireMouse event gets called.
The original place in I_CheckNativeMouse is unsafe because that function can get called from the system message queue which can result in a bad global state of the VM for such a call because it can be recursively invoked from code that may temporarily alter some settings.
This commit is contained in:
parent
484485f3cf
commit
d005e0b483
3 changed files with 10 additions and 6 deletions
|
|
@ -284,7 +284,7 @@ static bool CaptureMode_InGame()
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
void I_CheckNativeMouse(bool preferNative)
|
||||
void I_CheckNativeMouse(bool preferNative, bool eventhandlerresult)
|
||||
{
|
||||
bool windowed = (screen == NULL) || !screen->IsFullscreen();
|
||||
bool want_native;
|
||||
|
|
@ -311,7 +311,7 @@ void I_CheckNativeMouse(bool preferNative)
|
|||
}
|
||||
}
|
||||
|
||||
if (!want_native && eventManager.CheckRequireMouse())
|
||||
if (!want_native && eventhandlerresult)
|
||||
want_native = true;
|
||||
|
||||
//Printf ("%d %d %d\n", wantNative, preferNative, NativeMouse);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue