From 254c3db4a39aa35274fd7cd4ec2cccde5b92d71b Mon Sep 17 00:00:00 2001 From: Thorbjørn Lindeijer Date: Tue, 27 Feb 2024 10:51:33 +0000 Subject: Added VSync and windowed fullscreen options The configuration and setup UI were adjusted to the new options. This also fixes issues in applying new video settings. Default resolution was changed from 800x600 to 1280x720. VSync is enabled by default while FPS limit was disabled. Display aspect ratio for the resolution options. I had to work around some macOS issues: * Don't change window size when it appears to be "maximized", since it just changes the rendering area while leaving the window maximized. * Unset fullscreen display mode temporarily to allow changing resolutions, otherwise the rendering area no longer matches the screen and mouse input is also off. * Removed SDL_WINDOW_ALLOW_HIGHDPI for now because it causes issues on macOS, since we're not actually handling the scaling factor. A Video class and an SDLGraphics subclass were split off from Graphics. This setup has Less duplication and leaves the OpenGLGraphics and SDLGraphics better separated. Fixes #57 Fixes #58 --- src/resources/image.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/resources/image.h') diff --git a/src/resources/image.h b/src/resources/image.h index 662c0393..20a85433 100644 --- a/src/resources/image.h +++ b/src/resources/image.h @@ -44,7 +44,7 @@ class Dye; */ class Image : public Resource { - friend class Graphics; + friend class SDLGraphics; #ifdef USE_OPENGL friend class OpenGLGraphics; #endif -- cgit v1.2.3-70-g09d2