Changeset - r24941:4e760118066a
[Not reviewed]
master
0 3 0
Patric Stout - 3 years ago 2021-02-24 13:52:04
truebrain@openttd.org
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.
3 files changed with 3 insertions and 3 deletions:
0 comments (0 inline, 0 general)
src/video/cocoa/cocoa_v.h
Show inline comments
 
@@ -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;
 

	
src/video/cocoa/cocoa_v.mm
Show inline comments
 
@@ -433,7 +433,7 @@ void VideoDriver_Cocoa::InputLoop()
 
}
 

	
 
/** Main game loop. */
 
void VideoDriver_Cocoa::GameLoop()
 
void VideoDriver_Cocoa::MainLoopReal()
 
{
 
	for (;;) {
 
		@autoreleasepool {
src/video/cocoa/cocoa_wnd.mm
Show inline comments
 
@@ -152,7 +152,7 @@ static std::vector<WChar> NSStringToUTF3
 
	[ 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 ];
0 comments (0 inline, 0 general)