mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-06 14:27:16 +00:00
(svn r10839) -Fix [FS#873]: bring up the assert window for OSX even when there isn't a video-driver loaded (PinguTux)
This commit is contained in:
parent
210ba54ff5
commit
04824abac6
@ -2064,14 +2064,16 @@ void CocoaDialog(const char* title, const char* message, const char* buttonLabel
|
||||
_cocoa_video_dialog = true;
|
||||
|
||||
wasstarted = _cocoa_video_started;
|
||||
if (!_cocoa_video_started && _video_driver->Start(NULL) != NULL) {
|
||||
if (_video_driver == NULL) {
|
||||
setupApplication(); // Setup application before showing dialog
|
||||
} else if (!_cocoa_video_started && _video_driver->Start(NULL) != NULL) {
|
||||
fprintf(stderr, "%s: %s\n", title, message);
|
||||
return;
|
||||
}
|
||||
|
||||
NSRunAlertPanel([NSString stringWithCString: title], [NSString stringWithCString: message], [NSString stringWithCString: buttonLabel], nil, nil);
|
||||
|
||||
if (!wasstarted) _video_driver->Stop();
|
||||
if (!wasstarted && _video_driver != NULL) _video_driver->Stop();
|
||||
|
||||
_cocoa_video_dialog = false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user