summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPatric Stout <truebrain@openttd.org>2021-02-24 14:52:04 +0100
committerPatric Stout <github@truebrain.nl>2021-02-24 21:58:47 +0100
commit6a8c461e38360d14fc36d77a63150a07c6e64ff9 (patch)
treea51915173ae7572057b9a4db47c87330fb4ab883 /src
parent67d3c6aa7186fe54725d06cc246a95dc62a4bbfb (diff)
downloadopenttd-6a8c461e38360d14fc36d77a63150a07c6e64ff9.tar.xz
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.
Diffstat (limited to 'src')
-rw-r--r--src/video/cocoa/cocoa_v.h2
-rw-r--r--src/video/cocoa/cocoa_v.mm2
-rw-r--r--src/video/cocoa/cocoa_wnd.mm2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/video/cocoa/cocoa_v.h b/src/video/cocoa/cocoa_v.h
index d95d7bf98..a32c7065d 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 b5ed5329e..dd49cd211 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 78e942c92..d5a7ba84c 100644
--- a/src/video/cocoa/cocoa_wnd.mm
+++ b/src/video/cocoa/cocoa_wnd.mm
@@ -152,7 +152,7 @@ static std::vector<WChar> 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 ];