summaryrefslogtreecommitdiff
path: root/src/video/win32_v.cpp
diff options
context:
space:
mode:
authorPatric Stout <truebrain@openttd.org>2021-02-20 11:30:09 +0100
committerPatric Stout <github@truebrain.nl>2021-02-20 17:08:44 +0100
commit7996fadb91b6ff9a8ca17791d03677ddb438fc07 (patch)
treef693c87a820624fa57bf02afdac4bf20410e52fa /src/video/win32_v.cpp
parent23d6f4eac9c85b050bf9efa8f0e94e333d969244 (diff)
downloadopenttd-7996fadb91b6ff9a8ca17791d03677ddb438fc07.tar.xz
Change: [Win32] Remove force_full_redraw and display_hz settings
These were special settings only for the win32-drivers, and introduced in the very first version we track. Time kinda had caught up with those variables, so it is time to say farewell. force_full_redraw was most likely a debug functionality "in case our dirty-rect fails". This should no longer be needed. display_hz was cute, as it had a max of 120. That is kinda out-dated information, but I also doubt anyone was really using this.
Diffstat (limited to 'src/video/win32_v.cpp')
-rw-r--r--src/video/win32_v.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/video/win32_v.cpp b/src/video/win32_v.cpp
index e3728a646..4a666cd1d 100644
--- a/src/video/win32_v.cpp
+++ b/src/video/win32_v.cpp
@@ -54,9 +54,7 @@ static struct {
bool running; ///< Is the main loop running?
} _wnd;
-bool _force_full_redraw;
bool _window_maximize;
-uint _display_hz;
static Dimension _bck_resolution;
DWORD _imm_props;
@@ -253,12 +251,10 @@ bool VideoDriver_Win32::MakeWindow(bool full_screen)
settings.dmFields =
DM_BITSPERPEL |
DM_PELSWIDTH |
- DM_PELSHEIGHT |
- (_display_hz != 0 ? DM_DISPLAYFREQUENCY : 0);
+ DM_PELSHEIGHT;
settings.dmBitsPerPel = BlitterFactory::GetCurrentBlitter()->GetScreenDepth();
settings.dmPelsWidth = _wnd.width_org;
settings.dmPelsHeight = _wnd.height_org;
- settings.dmDisplayFrequency = _display_hz;
/* Check for 8 bpp support. */
if (settings.dmBitsPerPel == 8 &&
@@ -1245,8 +1241,6 @@ void VideoDriver_Win32::MainLoop()
/* Avoid next_draw_tick getting behind more and more if it cannot keep up. */
if (next_draw_tick < cur_ticks - ALLOWED_DRIFT * this->GetDrawInterval()) next_draw_tick = cur_ticks;
- if (_force_full_redraw) MarkWholeScreenDirty();
-
this->InputLoop();
::InputLoop();
UpdateWindows();