From 0251786f463ae651ab9a4e848b8aafb403a8f145 Mon Sep 17 00:00:00 2001 From: Rubidium Date: Fri, 6 Jan 2023 18:31:29 +0100 Subject: [PATCH] Fix: virtual call from constructor That fills an instance variable that is only read from the Game Options window and that is overwritten when the video driver is started. Since you cannot get into the Game Options window without starting the video driver, it is just pointless and wrong code that would never be noticed by the end user. --- src/video/sdl2_v.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/video/sdl2_v.h b/src/video/sdl2_v.h index a2298c44e9..9b70eafd9c 100644 --- a/src/video/sdl2_v.h +++ b/src/video/sdl2_v.h @@ -17,7 +17,7 @@ /** The SDL video driver. */ class VideoDriver_SDL_Base : public VideoDriver { public: - VideoDriver_SDL_Base() : sdl_window(nullptr), buffer_locked(false), driver_info(this->GetName()) {} + VideoDriver_SDL_Base() : sdl_window(nullptr), buffer_locked(false) {} const char *Start(const StringList ¶m) override; @@ -41,8 +41,6 @@ public: std::vector GetListOfMonitorRefreshRates() override; - const char *GetName() const override { return "sdl"; } - const char *GetInfoString() const override { return this->driver_info.c_str(); } protected: