(svn r26538) -Codechange: remove double accounting of the drivers
This commit is contained in:
@@ -597,16 +597,16 @@ void CocoaDialog(const char *title, const char *message, const char *buttonLabel
|
||||
_cocoa_video_dialog = true;
|
||||
|
||||
bool wasstarted = _cocoa_video_started;
|
||||
if (_video_driver == NULL) {
|
||||
if (VideoDriver::GetInstance() == NULL) {
|
||||
setupApplication(); // Setup application before showing dialog
|
||||
} else if (!_cocoa_video_started && _video_driver->Start(NULL) != NULL) {
|
||||
} else if (!_cocoa_video_started && VideoDriver::GetInstance()->Start(NULL) != NULL) {
|
||||
fprintf(stderr, "%s: %s\n", title, message);
|
||||
return;
|
||||
}
|
||||
|
||||
NSRunAlertPanel([ NSString stringWithUTF8String:title ], [ NSString stringWithUTF8String:message ], [ NSString stringWithUTF8String:buttonLabel ], nil, nil);
|
||||
|
||||
if (!wasstarted && _video_driver != NULL) _video_driver->Stop();
|
||||
if (!wasstarted && VideoDriver::GetInstance() != NULL) VideoDriver::GetInstance()->Stop();
|
||||
|
||||
_cocoa_video_dialog = false;
|
||||
}
|
||||
|
||||
@@ -287,7 +287,7 @@ static bool QZ_KeyEvent(unsigned short keycode, unsigned short unicode, BOOL dow
|
||||
case QZ_RETURN:
|
||||
case QZ_f:
|
||||
if (down && (_current_mods & NSCommandKeyMask)) {
|
||||
_video_driver->ToggleFullscreen(!_fullscreen);
|
||||
VideoDriver::GetInstance()->ToggleFullscreen(!_fullscreen);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user