Fractal Softworks Forum

Please login or register.

Login with username, password and session length

Author Topic: [0.8a-RC19] Mouse Offset Due to Windows 10 GUI Scaling  (Read 2836 times)

Sundog

  • Admiral
  • *****
  • Posts: 1727
    • View Profile
[0.8a-RC19] Mouse Offset Due to Windows 10 GUI Scaling
« on: May 02, 2017, 01:06:55 PM »

The display setting shown below causes some issues with Starsector. I believe it's a setting introduced in Windows 10. Everything works fine when set at 100%. Notice how the launcher isn't centered on the screen.

Spoiler
[close]

The real problem is that this causes mouse position to be offset in Starsector, as shown below (the New Game button was highlighted, but the cursor wasn't over the it).
Spoiler
[close]

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24149
    • View Profile
Re: [0.8a-RC19] Mouse Offset Due to Windows 10 GUI Scaling
« Reply #1 on: May 02, 2017, 01:08:14 PM »

Hmm. Right-click on icon, properties, compatibility, "Disable display scaling on high DPI settings"? Seems like that might help.
Logged

Sundog

  • Admiral
  • *****
  • Posts: 1727
    • View Profile
Re: [0.8a-RC19] Mouse Offset Due to Windows 10 GUI Scaling
« Reply #2 on: May 02, 2017, 10:20:03 PM »

Yep, that did the trick. That'll save me the trouble of switching the setting back and forth, but I worry that it could be more than just an inconvenience for other users.

TJJ

  • Admiral
  • *****
  • Posts: 1905
    • View Profile
Re: [0.8a-RC19] Mouse Offset Due to Windows 10 GUI Scaling
« Reply #3 on: May 03, 2017, 02:45:49 AM »

In Java 7 I believe this behaviour can be programmatically worked around with the flag:

sun.java2d.dpiaware=false

Java 8 does some stuff differently, so might fix the issue.
Though from what I've read, per-monitor DPI scaling in Win 10 seem to cause a whole host of new problems.  :o
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24149
    • View Profile
Re: [0.8a-RC19] Mouse Offset Due to Windows 10 GUI Scaling
« Reply #4 on: May 03, 2017, 11:05:52 AM »

Yep, that did the trick. That'll save me the trouble of switching the setting back and forth, but I worry that it could be more than just an inconvenience for other users.

Yeah; something I've had to mention a couple of times. Would you mind unchecking that checkbox and adding
-Dsun.java2d.dpiaware=false

To vmparams, to see if it actually works?
Logged

Sundog

  • Admiral
  • *****
  • Posts: 1727
    • View Profile
Re: [0.8a-RC19] Mouse Offset Due to Windows 10 GUI Scaling
« Reply #5 on: May 04, 2017, 04:14:37 PM »

Sorry for the dalay. So... mixed results with "-Dsun.java2d.dpiaware=false." Had I known this little experiment would end up being so inconsistent I would have kept better track of what I tried, but unfortunately I didn't, so this might be missing useful details. The first time I tried it, it seemed to work like a charm, but then I tried to reproduce the issue and I couldn't. I removed Dsun.java2d.dpiaware from vmparams, set it to true, switched GUI scaling between 100 and 150 percent, reset my desktop, ran RC17 instead of 19, and tried doing those things in various combinations, but I couldn't break Starsector's GUI again. I tried with a different monitor and finally reproduced the issue, and after setting Dsun.java2d.dpiaware to false it was fixed. However, I still wasn't able to get this setting to behave as I would expect. Currently my installation of RC19 disables dpi scaling regardless of the setting, and RC17 enables it regardless of the setting. Frankly, I'm at a loss as to how this setting works, or whether or not it works at all.

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24149
    • View Profile
Re: [0.8a-RC19] Mouse Offset Due to Windows 10 GUI Scaling
« Reply #6 on: May 04, 2017, 07:04:04 PM »

Thanks for giving it a go! Or, several goes, as the case may be. Hmm...
Logged

Sundog

  • Admiral
  • *****
  • Posts: 1727
    • View Profile
Re: [0.8a-RC19] Mouse Offset Due to Windows 10 GUI Scaling
« Reply #7 on: May 04, 2017, 07:48:32 PM »

No problem. Please let me know if there's anything else I can do.