diff options
author | Patric Stout <truebrain@openttd.org> | 2021-02-20 11:08:20 +0100 |
---|---|---|
committer | Patric Stout <github@truebrain.nl> | 2021-02-20 17:08:44 +0100 |
commit | 790fa7102ec934544b427dd5fa9fc4f7099fd4da (patch) | |
tree | 7eeb947fad5f31e517e23d0e9d44693f510889f7 /src/video/cocoa/cocoa_v.mm | |
parent | 761efbb4571397fe9e5f19049ca64663e12cbc1e (diff) | |
download | openttd-790fa7102ec934544b427dd5fa9fc4f7099fd4da.tar.xz |
Codechange: be consistent in naming the paint function Paint()
Also move this function to be a class member. This to allow
further deduplicating of code in a later commit.
Diffstat (limited to 'src/video/cocoa/cocoa_v.mm')
-rw-r--r-- | src/video/cocoa/cocoa_v.mm | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/video/cocoa/cocoa_v.mm b/src/video/cocoa/cocoa_v.mm index 5e8c82b2a..1847d53fc 100644 --- a/src/video/cocoa/cocoa_v.mm +++ b/src/video/cocoa/cocoa_v.mm @@ -465,10 +465,10 @@ void VideoDriver_Cocoa::BlitIndexedToView32(int left, int top, int right, int bo } /** - * Draw window. + * Paint window. * @param force_update Whether to redraw unconditionally */ -void VideoDriver_Cocoa::Draw(bool force_update) +void VideoDriver_Cocoa::Paint() { PerformanceMeasurer framerate(PFE_VIDEO); @@ -502,9 +502,8 @@ void VideoDriver_Cocoa::Draw(bool force_update) dirtyrect.size.height = this->dirty_rects[i].bottom - this->dirty_rects[i].top; /* Normally drawRect will be automatically called by Mac OS X during next update cycle, - * and then blitting will occur. If force_update is true, it will be done right now. */ + * and then blitting will occur. */ [ this->cocoaview setNeedsDisplayInRect:[ this->cocoaview getVirtualRect:dirtyrect ] ]; - if (force_update) [ this->cocoaview displayIfNeeded ]; } this->num_dirty_rects = 0; @@ -708,7 +707,7 @@ void VideoDriver_Cocoa::GameLoop() UpdateWindows(); this->CheckPaletteAnim(); - this->Draw(); + this->Paint(); } /* If we are not in fast-forward, create some time between calls to ease up CPU usage. */ |