diff options
author | Patric Stout <truebrain@openttd.org> | 2021-02-11 09:51:07 +0100 |
---|---|---|
committer | Patric Stout <github@truebrain.nl> | 2021-02-11 20:23:53 +0100 |
commit | 2bbef6b5cf86dac53461e10c5720a05c579304d3 (patch) | |
tree | bc5d9b2677377a04006f0c987ebe113ec0741cb7 | |
parent | 569ce6c7b43be52911d1a56ed43b890f5cc2d765 (diff) | |
download | openttd-2bbef6b5cf86dac53461e10c5720a05c579304d3.tar.xz |
Codechange: [SDL2] Name paint function Paint(), like other drivers do
This reduces confusion when reading different drivers.
-rw-r--r-- | src/video/sdl2_v.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/video/sdl2_v.cpp b/src/video/sdl2_v.cpp index e24b31db5..798f40a59 100644 --- a/src/video/sdl2_v.cpp +++ b/src/video/sdl2_v.cpp @@ -133,7 +133,7 @@ void VideoDriver_SDL::CheckPaletteAnim() this->MakeDirty(0, 0, _screen.width, _screen.height); } -static void DrawSurfaceToScreen() +static void Paint() { PerformanceMeasurer framerate(PFE_VIDEO); @@ -179,7 +179,7 @@ static void DrawSurfaceToScreen() _num_dirty_rects = 0; } -static void DrawSurfaceToScreenThread() +static void PaintThread() { /* First tell the main thread we're started */ std::unique_lock<std::recursive_mutex> lock(*_draw_mutex); @@ -190,7 +190,7 @@ static void DrawSurfaceToScreenThread() while (_draw_continue) { /* Then just draw and wait till we stop */ - DrawSurfaceToScreen(); + Paint(); _draw_signal->wait(lock); } } @@ -834,7 +834,7 @@ void VideoDriver_SDL::LoopOnce() _draw_signal->notify_one(); } else { /* Oh, we didn't have threads, then just draw unthreaded */ - DrawSurfaceToScreen(); + Paint(); } } @@ -857,7 +857,7 @@ void VideoDriver_SDL::MainLoop() _draw_signal = new std::condition_variable_any(); _draw_continue = true; - _draw_threaded = StartNewThread(&draw_thread, "ottd:draw-sdl", &DrawSurfaceToScreenThread); + _draw_threaded = StartNewThread(&draw_thread, "ottd:draw-sdl", &PaintThread); /* Free the mutex if we won't be able to use it. */ if (!_draw_threaded) { |