diff options
Diffstat (limited to 'Minecraft.Client/Windows64/Windows64_Minecraft.cpp')
| -rw-r--r-- | Minecraft.Client/Windows64/Windows64_Minecraft.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/Minecraft.Client/Windows64/Windows64_Minecraft.cpp b/Minecraft.Client/Windows64/Windows64_Minecraft.cpp index 6c6cec15..931e7f17 100644 --- a/Minecraft.Client/Windows64/Windows64_Minecraft.cpp +++ b/Minecraft.Client/Windows64/Windows64_Minecraft.cpp @@ -395,6 +395,9 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) case WM_MOUSEWHEEL: KMInput.OnMouseWheel(GET_WHEEL_DELTA_WPARAM(wParam)); break; + case WM_MOUSEMOVE: + KMInput.OnMouseMove(GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam)); + break; case WM_ACTIVATE: if (LOWORD(wParam) == WA_INACTIVE) KMInput.SetCapture(false); @@ -404,6 +407,15 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) KMInput.ClearAllState(); break; + case WM_SETCURSOR: + // Hide the OS cursor when an Iggy/Flash menu is displayed (it has its own Flash cursor) + if (LOWORD(lParam) == HTCLIENT && !KMInput.IsCaptured() && ui.GetMenuDisplayed(0)) + { + SetCursor(NULL); + return TRUE; + } + return DefWindowProc(hWnd, message, wParam, lParam); + default: return DefWindowProc(hWnd, message, wParam, lParam); } @@ -1184,7 +1196,7 @@ int APIENTRY _tWinMain(_In_ HINSTANCE hInstance, // Update mouse capture: capture when in-game and no menu is open { static bool altToggleSuppressCapture = false; - bool shouldCapture = app.GetGameStarted() && !ui.GetMenuDisplayed(0); + bool shouldCapture = app.GetGameStarted() && !ui.GetMenuDisplayed(0) && pMinecraft->screen == NULL; // Left Alt key toggles capture on/off for debugging if (KMInput.IsKeyPressed(VK_MENU)) { |
