#10996 closed defect (fixed)
Gamepad cursor jumps to the far left when you move it to the right side in Fullscreen mode
Reported by: | rophel | Owned by: | bgK |
---|---|---|---|
Priority: | normal | Component: | Common |
Version: | Keywords: | ||
Cc: | Game: |
Description
Repro steps:
1 Start latest daily snapshot
2 Edit scummvm.ini to enable gamepad (add "joystick_num=0")
3 Make sure you have a gamepad on and plugged in, then Launch ScummVM.
4 Select Options > enable option "fullscreen mode" and click apply.
5 Using gamepad, move left stick to the right.
Results:
Cursor will move to the right, but then 15% from the edge of the window it will jump to the far left. This makes it impossible to play games via gamepad since part of the screen can not be selected.
Issue is not present in 2.0.0 or old stable build found on the downloads page. It also seems to only be present in builds using SDL 2.0. The issue is resolved when playing in windowed mode, or when playing with fullscreen centered mode.
Change History (6)
comment:1 by , 5 years ago
comment:2 by , 5 years ago
I can't replicate this using the latest snapshot and a Playstation 4 controller.
comment:3 by , 5 years ago
I can't repo with xbox 360 controller either.
Which ScummVM binary are you using, which OS, which SDL version, and which controller?
comment:4 by , 5 years ago
Big find: This only occurs when my resolution is set to 2560x1440, 1920x1080 works fine.
I am using Windows 10 1903 64 bit, SDL is 2.0, the one included with latest snapshot. Controller is Xbox One.
comment:5 by , 5 years ago
Looks like you put your finger on something interesting indeed. The gamepad -> mouse code uses 16-bits integers for some computations, and a 16x multiplier. 2560 * 16 overflows a signed 16 bits integer, while 1920 * 16 does not.
Note: If you resize the ScummVM window to be larger, the issue is still present even in windowed mode.