From 6a8c461e38360d14fc36d77a63150a07c6e64ff9 Mon Sep 17 00:00:00 2001 From: Patric Stout Date: Wed, 24 Feb 2021 14:52:04 +0100 Subject: [PATCH] Codechange: [OSX] GameLoop is really more like MainLoop MainLoop() is used to bootstrap OSX, where later a callback is done to GameLoop() to execute OpenTTD. All other video drivers don't need that, so what is in GameLoop is in MainLoop for all other drivers. This is rather confusing. So, instead, name GameLoop MainLoopReal to be more in sync with the other drivers. --- src/video/cocoa/cocoa_v.h | 2 +- src/video/cocoa/cocoa_v.mm | 2 +- src/video/cocoa/cocoa_wnd.mm | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/video/cocoa/cocoa_v.h b/src/video/cocoa/cocoa_v.h index d95d7bf981..a32c7065d9 100644 --- a/src/video/cocoa/cocoa_v.h +++ b/src/video/cocoa/cocoa_v.h @@ -49,7 +49,7 @@ public: /* --- The following methods should be private, but can't be due to Obj-C limitations. --- */ - void GameLoop(); + void MainLoopReal(); virtual void AllocateBackingStore(bool force = false) = 0; diff --git a/src/video/cocoa/cocoa_v.mm b/src/video/cocoa/cocoa_v.mm index b5ed5329e6..dd49cd2110 100644 --- a/src/video/cocoa/cocoa_v.mm +++ b/src/video/cocoa/cocoa_v.mm @@ -433,7 +433,7 @@ void VideoDriver_Cocoa::InputLoop() } /** Main game loop. */ -void VideoDriver_Cocoa::GameLoop() +void VideoDriver_Cocoa::MainLoopReal() { for (;;) { @autoreleasepool { diff --git a/src/video/cocoa/cocoa_wnd.mm b/src/video/cocoa/cocoa_wnd.mm index 78e942c92f..d5a7ba84ce 100644 --- a/src/video/cocoa/cocoa_wnd.mm +++ b/src/video/cocoa/cocoa_wnd.mm @@ -152,7 +152,7 @@ static std::vector NSStringToUTF32(NSString *s) [ e release ]; /* Hand off to main application code. */ - drv->GameLoop(); + drv->MainLoopReal(); /* We are done, thank you for playing. */ [ self performSelectorOnMainThread:@selector(stopEngine) withObject:nil waitUntilDone:FALSE ];