MinecraftConsoles/Minecraft.Client/Windows64
MrTheShy 66d8c647ce Fix splitscreen mouse, keyboard cursor, and local player join
Mouse hover and click in split-screen was broken: the coordinate
conversion from window pixels to Flash/SWF space did not account for
the viewport tile-origin offset or the smaller display dimensions of
each splitscreen quadrant. Now the mouse position is mapped through
three steps: window pixels to UIController screen space, subtract the
viewport origin (which varies per quadrant/split type), then scale
from display size to SWF authoring size. This fixes hover highlighting
and click targeting in all splitscreen layouts.

Mouse input was also bleeding into other splitscreen players' UI groups
because the scene lookup iterated all groups. Now it only checks the
fullscreen group and the primary (KBM) player's group, so controller
players' menus are never affected by mouse movement.

Mouse grab/release (cursor lock for gameplay) was triggering for every
local player's tick, causing fights between splitscreen players over
the cursor state. Now only the primary pad player controls grab state.

The in-game keyboard scene in PC mode had no cursor movement: typing
always appended at the end and backspace always deleted from the end.
Added a cursor position tracker (m_iCursorPos) so that characters are
inserted at the cursor, backspace deletes behind it, and arrow keys,
Home, End, and Delete all work as expected. The Flash caret is synced
to the cursor position each tick. Also stopped syncing the text buffer
back from Flash in PC mode, which was resetting the cursor every tick.
Arrow keys in PC mode no longer get forwarded to Flash (which would
move the on-screen keyboard selector instead of the text cursor).

AddLocalPlayerByUserIndex was calling NotifyPlayerJoined before the
IQNet slot was actually registered, passing a pointer obtained via
GetLocalPlayerByUserIndex which checks customData (not set yet at that
point). Now AddLocalPlayerByUserIndex is called first, and if it
succeeds, the notification uses the static m_player array directly.
The stub AddLocalPlayerByUserIndex now properly initialises the slot
with gamertag and remote/host flags instead of being a no-op.

IsSignedIn was hardcoded to return true only for pad 0, preventing
splitscreen players from joining. Now it checks IsPadConnected so any
connected controller can sign in.

GetXUID returned INVALID_XUID for all pads except 0, which broke
splitscreen player identity. Now each pad gets a unique XUID derived
from the base value plus the pad index.

Pinned internal resolution to 1920x1080 and removed GetSystemMetrics
auto-detection which was picking up the native monitor resolution and
breaking the 16:9 assumption in the viewport math and Flash layout.
DPI awareness is kept for consistent pixel coordinates.
2026-03-06 11:46:51 +01:00
..
4JLibs Update username logic and implement latest LCEMP changes (#311) 2026-03-04 04:50:28 +07:00
GameConfig Initial commit 2026-03-01 12:16:08 +08:00
Iggy Fix for any aspect ratio in 3D Environments (#320) 2026-03-05 02:13:58 +07:00
Leaderboards Initial commit 2026-03-01 12:16:08 +08:00
Network feat: headless server 2026-03-04 17:29:43 +08:00
Sentient feat: TU19 (Dec 2014) Features & Content (#155) 2026-03-03 03:04:10 +08:00
Social Initial commit 2026-03-01 12:16:08 +08:00
XML Initial commit 2026-03-01 12:16:08 +08:00
KeyboardMouseInput.cpp Fix mouse cursor staying trapped in window on alt-tab 2026-03-06 05:39:29 +01:00
KeyboardMouseInput.h Fix save list, delete save, exit without saving, and blank username on Windows64 (#539) 2026-03-05 14:57:37 -06:00
Minecraft_Macros.h Initial commit 2026-03-01 12:16:08 +08:00
PostProcesser.cpp Fix gamma slider via pixel shader #178 (#481) 2026-03-06 02:41:17 +07:00
Resource.h Initial commit 2026-03-01 12:16:08 +08:00
Windows64_App.cpp Update username logic and implement latest LCEMP changes (#311) 2026-03-04 04:50:28 +07:00
Windows64_App.h Update username logic and implement latest LCEMP changes (#311) 2026-03-04 04:50:28 +07:00
Windows64_Minecraft.cpp Fix splitscreen mouse, keyboard cursor, and local player join 2026-03-06 11:46:51 +01:00
Windows64_UIController.cpp Increase GDRAW_D3D11_RESOURCE_rendertarget limit from 32 MB to 64 MB to prevent allocation warnings at high resolutions 2026-03-01 21:00:40 +01:00
Windows64_UIController.h Initial commit 2026-03-01 12:16:08 +08:00
Xbox_BuildVer.h Initial commit 2026-03-01 12:16:08 +08:00