From fc888cac2d71d8f7d7955f590a8e1c168d6dd376 Mon Sep 17 00:00:00 2001 From: ergo720 <45463469+ergo720@users.noreply.github.com> Date: Mon, 21 Sep 2020 11:02:50 +0200 Subject: [PATCH] Addressed review remarks --- src/common/input/InputDevice.h | 4 ++++ src/core/hle/D3D8/Direct3D9/Direct3D9.cpp | 1 + src/core/kernel/init/CxbxKrnl.cpp | 4 +--- src/core/kernel/init/CxbxKrnl.h | 2 -- src/gui/resource/ResCxbx.h | 2 +- 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/common/input/InputDevice.h b/src/common/input/InputDevice.h index b8465fe5e..155ecce1e 100644 --- a/src/common/input/InputDevice.h +++ b/src/common/input/InputDevice.h @@ -67,6 +67,10 @@ typedef enum class _XBOX_INPUT_DEVICE : int { } XBOX_INPUT_DEVICE; +// Flags that indicate that WM_MOUSELEAVE and WM_MOUSEMOVE respectively are being tracked in the rendering window procedure +inline bool g_bIsTrackingMoLeave = false; +inline bool g_bIsTrackingMoMove = false; + // Lookup array used to translate a gui port to an xbox usb port and vice versa extern int Gui2XboxPortArray[4]; diff --git a/src/core/hle/D3D8/Direct3D9/Direct3D9.cpp b/src/core/hle/D3D8/Direct3D9/Direct3D9.cpp index 79f67caa3..aaca83458 100644 --- a/src/core/hle/D3D8/Direct3D9/Direct3D9.cpp +++ b/src/core/hle/D3D8/Direct3D9/Direct3D9.cpp @@ -82,6 +82,7 @@ using namespace std::literals::chrono_literals; // Global(s) HWND g_hEmuWindow = NULL; // rendering window +bool g_bClipCursor = false; // indicates that the mouse cursor should be confined inside the rendering window IDirect3DDevice *g_pD3DDevice = nullptr; // Direct3D Device // Static Variable(s) diff --git a/src/core/kernel/init/CxbxKrnl.cpp b/src/core/kernel/init/CxbxKrnl.cpp index cf0908ad7..f5a5dcc59 100644 --- a/src/core/kernel/init/CxbxKrnl.cpp +++ b/src/core/kernel/init/CxbxKrnl.cpp @@ -112,11 +112,9 @@ size_t g_SystemMaxMemory = 0; HANDLE g_CurrentProcessHandle = 0; // Set in CxbxKrnlMain bool g_bIsWine = false; -bool g_bClipCursor = false; + bool g_CxbxPrintUEM = false; ULONG g_CxbxFatalErrorCode = FATAL_ERROR_NONE; -bool g_bIsTrackingMoLeave = false; -bool g_bIsTrackingMoMove = false; // Define function located in EmuXApi so we can call it from here void SetupXboxDeviceTypes(); diff --git a/src/core/kernel/init/CxbxKrnl.h b/src/core/kernel/init/CxbxKrnl.h index 7820bff18..09990d4a4 100644 --- a/src/core/kernel/init/CxbxKrnl.h +++ b/src/core/kernel/init/CxbxKrnl.h @@ -203,8 +203,6 @@ extern bool g_bIsWine; extern bool g_bClipCursor; extern bool g_CxbxPrintUEM; extern ULONG g_CxbxFatalErrorCode; -extern bool g_bIsTrackingMoLeave; -extern bool g_bIsTrackingMoMove; extern size_t g_SystemMaxMemory; diff --git a/src/gui/resource/ResCxbx.h b/src/gui/resource/ResCxbx.h index 19c3f7a20..20c2c4b63 100644 --- a/src/gui/resource/ResCxbx.h +++ b/src/gui/resource/ResCxbx.h @@ -377,7 +377,7 @@ #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NEXT_RESOURCE_VALUE 136 #define _APS_NEXT_COMMAND_VALUE 40117 -#define _APS_NEXT_CONTROL_VALUE 1305 +#define _APS_NEXT_CONTROL_VALUE 1308 #define _APS_NEXT_SYMED_VALUE 109 #endif #endif