diff options
Diffstat (limited to 'Minecraft.Client/Minecraft.cpp')
| -rw-r--r-- | Minecraft.Client/Minecraft.cpp | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/Minecraft.Client/Minecraft.cpp b/Minecraft.Client/Minecraft.cpp index 1fc8bd54..d843ee79 100644 --- a/Minecraft.Client/Minecraft.cpp +++ b/Minecraft.Client/Minecraft.cpp @@ -2373,16 +2373,21 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures) } #ifdef _WINDOWS64 - if ((screen != NULL || ui.GetMenuDisplayed(iPad)) && g_KBMInput.IsMouseGrabbed()) + // Mouse grab/release only for the primary (KBM) player — splitscreen + // players use controllers and must never fight over the cursor state. + if (iPad == ProfileManager.GetPrimaryPad()) { - g_KBMInput.SetMouseGrabbed(false); + if ((screen != NULL || ui.GetMenuDisplayed(iPad)) && g_KBMInput.IsMouseGrabbed()) + { + g_KBMInput.SetMouseGrabbed(false); + } } #endif if (screen == NULL && !ui.GetMenuDisplayed(iPad) ) { #ifdef _WINDOWS64 - if (!g_KBMInput.IsMouseGrabbed() && g_KBMInput.IsWindowFocused()) + if (iPad == ProfileManager.GetPrimaryPad() && !g_KBMInput.IsMouseGrabbed() && g_KBMInput.IsWindowFocused()) { g_KBMInput.SetMouseGrabbed(true); } @@ -4669,8 +4674,14 @@ void Minecraft::startAndConnectTo(const wstring& name, const wstring& sid, const Minecraft *minecraft; // 4J - was new Minecraft(frame, canvas, NULL, 854, 480, fullScreen); - - minecraft = new Minecraft(NULL, NULL, NULL, 1280, 720, fullScreen); + // Logical width is proportional to the real screen aspect ratio so that + // the ortho projection and HUD layout match the viewport without stretching. + extern int g_iScreenWidth; + extern int g_iScreenHeight; + int logicalH = 720; + int logicalW = logicalH * g_iScreenWidth / g_iScreenHeight; + + minecraft = new Minecraft(NULL, NULL, NULL, logicalW, logicalH, fullScreen); /* - 4J - removed { |
