OpenRA / OpenRA

Open Source real-time strategy game engine for early Westwood games such as Command & Conquer: Red Alert written in C# using SDL and OpenGL. Runs on Windows, Linux, *BSD and Mac OS X.
https://www.openra.net
GNU General Public License v3.0
14.71k stars 2.68k forks source link

vertical mouse offset incorrect when scaling with xrandr #18551

Open Vic-s opened 4 years ago

Vic-s commented 4 years ago

Issue Summary

DESCRIPTION side note: Since fractional scaling still does not work on Ubuntu 20.04.1 with X11 and NVidia drivers I use xrandr to do this. xrandr --output HDMI-0 --scale 0.75x0.75 Untill now this works for all applications including even Wine.

After starting the ./OpenRA-Red-Alert-x86_64.AppImage the opening screen appears and asks to download additional content. 3 buttons (advance install, quick install and quit) are show but can only selected by clicking way below the buttons.

when setting the scaling to 1 xrandr --output HDMI-0 --scale 1x1 I can select the buttons correctly. I tried the last 3 releases of OpenRA (20200503, 20200202 and 20190314). When changing the display resolution to a lower resolution all works well but I lose the sharpness of scaling.

Reproduction

STEPS TO REPRODUCE THE ISSUE xrandr --output HDMI-0 --scale 0.75x0.75 Note: use the correct output monitor for your system. You can find them with xrandr --listmonitors

Expected behavior

EXPECTED BEHAVIOR Use mouse pointer to select button when is is over the button not half a screen below.

Screenshots / Screen recordings / Replays

romanj commented 4 years ago

I was facing quite similar issue on arch linux also using x-rand but a little different case I am working on laptop and additional display. OpenRA settings were set to Display 1 (laptop screen) But with my windows manager I was moving game to display 2 (different resulution) Then i was able to hover/click buttons when my cursor was way above the buttons. After I changed openRA settings to Display 2 (additional monitor) then everything worked fine