Skip to content
This repository was archived by the owner on Jan 5, 2024. It is now read-only.

Commit 26250fc

Browse files
committed
Shittily fix mouse not updating in menus when there is no mouse player configured (no player input device is set to mouse+keyboard) (exposed by 9a6e552 so this is a followup I guess)
1 parent 84e7e3c commit 26250fc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Managers/UInputMan.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1017,7 +1017,8 @@ namespace RTE {
10171017
void UInputMan::UpdateMouseInput() {
10181018
// Detect and store mouse movement input, translated to analog stick emulation
10191019
int mousePlayer = MouseUsedByPlayer();
1020-
if (mousePlayer != Players::NoPlayer) {
1020+
// TODO: Figure out a less shit solution to updating the mouse in GUIs when there are no mouse players configured, i.e. no player input scheme is using mouse+keyboard. For not just check if we're out of Activity.
1021+
if (!g_ActivityMan.IsInActivity() || mousePlayer != Players::NoPlayer) {
10211022
// Multiplying by 30 for sensitivity. TODO: Make sensitivity slider 1-50;
10221023
m_AnalogMouseData.m_X += m_RawMouseMovement.m_X * 3;
10231024
m_AnalogMouseData.m_Y += m_RawMouseMovement.m_Y * 3;

0 commit comments

Comments
 (0)