mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-22 17:49:43 +01:00
e3612afbd3
I have this annoying issue where the game will open on the wrong monitor in fullscreen mode, because that monitor is considered to be display 0, whereas the primary monitor I want is display 1. To mitigate this somewhat, the game now stores the display index that it was closed on, and will save it to settings. Then the next time the game opens, it will open on that display index. This should work pretty well as long as you aren't changing your monitor setup constantly. Of course, none of this applies if your window manager is busted. For example, on GNOME Wayland, which is what I use, in windowed mode the game will always open on the monitor the cursor is on, and it won't even be centered in the monitor. But it works fine if I use XWayland via SDL_VIDEODRIVER=x11.
26 lines
449 B
C
26 lines
449 B
C
#ifndef SCREENSETTINGS_H
|
|
#define SCREENSETTINGS_H
|
|
|
|
enum
|
|
{
|
|
SCALING_LETTERBOX = 0,
|
|
SCALING_STRETCH = 1,
|
|
SCALING_INTEGER = 2,
|
|
NUM_SCALING_MODES
|
|
};
|
|
|
|
struct ScreenSettings
|
|
{
|
|
int windowDisplay;
|
|
int windowWidth;
|
|
int windowHeight;
|
|
bool fullscreen;
|
|
bool useVsync;
|
|
int scalingMode;
|
|
bool linearFilter;
|
|
bool badSignal;
|
|
};
|
|
|
|
void ScreenSettings_default(struct ScreenSettings* _this);
|
|
|
|
#endif /* SCREENSETTINGS_H */
|