Changeset - r26728:d50c0d7b11c7
[Not reviewed]
master
0 1 0
Rubidium - 23 months ago 2023-01-06 17:31:29
rubidium@openttd.org
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.
1 file changed with 1 insertions and 3 deletions:
0 comments (0 inline, 0 general)
src/video/sdl2_v.h
Show inline comments
 
@@ -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 &param) override;
 

	
 
@@ -41,8 +41,6 @@ public:
 

	
 
	std::vector<int> GetListOfMonitorRefreshRates() override;
 

	
 
	const char *GetName() const override { return "sdl"; }
 

	
 
	const char *GetInfoString() const override { return this->driver_info.c_str(); }
 

	
 
protected:
0 comments (0 inline, 0 general)