From 7f83b190cc318dc5083e71401be2553c39c42deb Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Wed, 22 Apr 2020 21:46:22 +0200 Subject: [PATCH] - a few more fixes. --- src/posix/cocoa/i_input.mm | 2 +- src/posix/cocoa/st_start.mm | 1 + src/posix/sdl/i_input.cpp | 3 +++ src/posix/sdl/i_system.cpp | 1 + 4 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/posix/cocoa/i_input.mm b/src/posix/cocoa/i_input.mm index b3315f804..8b81f86ad 100644 --- a/src/posix/cocoa/i_input.mm +++ b/src/posix/cocoa/i_input.mm @@ -162,7 +162,7 @@ void CheckNativeMouse() && (MENU_On == menuactive || MENU_OnNoPause == menuactive); } - if (!wantNative && primaryLevel->localEventManager->CheckRequireMouse()) + if (!wantNative && sysCallbacks && sysCallbacks->WantNativeMouse && sysCallbacks->WantNativeMouse()) wantNative = true; I_SetNativeMouse(wantNative); diff --git a/src/posix/cocoa/st_start.mm b/src/posix/cocoa/st_start.mm index 76df07f18..044c36986 100644 --- a/src/posix/cocoa/st_start.mm +++ b/src/posix/cocoa/st_start.mm @@ -39,6 +39,7 @@ #include "st_console.h" #include "st_start.h" #include "printf.h" +#include "engineerrors.h" FStartupScreen *StartScreen; diff --git a/src/posix/sdl/i_input.cpp b/src/posix/sdl/i_input.cpp index ad2181ae6..164b0b228 100644 --- a/src/posix/sdl/i_input.cpp +++ b/src/posix/sdl/i_input.cpp @@ -243,6 +243,9 @@ static void I_CheckNativeMouse () bool captureModeInGame = sysCallbacks && sysCallbacks->CaptureModeInGame && sysCallbacks->CaptureModeInGame(); bool wantNative = !focus || (!use_mouse || GUICapture || !captureModeInGame); + if (!wantNative && sysCallbacks && sysCallbacks->WantNativeMouse && sysCallbacks->WantNativeMouse()) + wantNative = true; + if (wantNative != NativeMouse) { NativeMouse = wantNative; diff --git a/src/posix/sdl/i_system.cpp b/src/posix/sdl/i_system.cpp index af7775114..43b8c8664 100644 --- a/src/posix/sdl/i_system.cpp +++ b/src/posix/sdl/i_system.cpp @@ -53,6 +53,7 @@ #include "cmdlib.h" #include "m_argv.h" #include "i_sound.h" +#include "i_interface.h" #ifndef NO_GTK