2020-11-13 01:29:11 +01:00
|
|
|
#ifndef SCREENSETTINGS_H
|
|
|
|
#define SCREENSETTINGS_H
|
|
|
|
|
2021-12-26 08:05:14 +01:00
|
|
|
enum
|
|
|
|
{
|
|
|
|
SCALING_LETTERBOX = 0,
|
|
|
|
SCALING_STRETCH = 1,
|
|
|
|
SCALING_INTEGER = 2,
|
|
|
|
NUM_SCALING_MODES
|
|
|
|
};
|
|
|
|
|
2020-11-13 01:29:11 +01:00
|
|
|
struct ScreenSettings
|
|
|
|
{
|
Store display index of window to settings
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.
2023-03-21 08:23:42 +01:00
|
|
|
int windowDisplay;
|
2021-09-07 03:56:39 +02:00
|
|
|
int windowWidth;
|
|
|
|
int windowHeight;
|
|
|
|
bool fullscreen;
|
|
|
|
bool useVsync;
|
2021-12-23 04:54:59 +01:00
|
|
|
int scalingMode;
|
2021-09-07 03:56:39 +02:00
|
|
|
bool linearFilter;
|
|
|
|
bool badSignal;
|
2020-11-13 01:29:11 +01:00
|
|
|
};
|
|
|
|
|
2021-12-25 09:18:51 +01:00
|
|
|
void ScreenSettings_default(struct ScreenSettings* _this);
|
|
|
|
|
2020-11-13 01:29:11 +01:00
|
|
|
#endif /* SCREENSETTINGS_H */
|