BUG: Negative screen positions are not supported


#1

Summary:
Assuming a setup like [Display A] [Display B] where “B” has been set up as main display, Stonehearth will not remember its position on A (because renderer.last_windows_x would be < 0?). It will reset the user_settings.json entry to 0 and launch on B.

For example, to run SH “full-screen” on A, the values xywh would likely be (-1920, 0, 1920, 1080).

The opposite seems to work, however; SH remembers its position on B (1920, 0, 1920, 1080) if A is the main display.

Steps to reproduce:
Using two displays, set the right one as main display, start SH, move it to the left, close SH and re-start it. Alternatively, simply set last_window_x to a negative value.

Expected Results:
SH should remember its location even if said location has negative coordinates (i.e. on a left/upper display) and start where it was left off.

Actual Results:
SH zeroes negative coordinates, therefore always appearing on the main display or right of it. If the window has been set smaller (for example to 800x600), it’s clearly visible that it is “hugging” the left border (i.e. has simply set the x value to 0).

Notes:
I can’t test it with vertical displays as that messes too much with my head but I guess that the < 0 check applies to y too. I’m not sure if that has already been fixed with the current rehaul.

Versions and Mods:
r27, no third party mods installed and no mod that I’ve written could produce something like that.

System Information:
Windows 7 x64 with a nVidia GeForce 760GTX.


#2

excellent report… even though i wasnt curious about this for SH, i’ve been wondering about the ability to do this for other games…

paging @not_owen_wilson:pager:


#3

Shameless bump. It’s still the same wirh r34. Funnily enough, it seems to work as long as some bit of the game is still on the right screen. I’m not sure if that was the case before. As soon as the whole game (minus the right border) is over, however, it’s resetting.