summaryrefslogtreecommitdiff
path: root/src/video/cocoa
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2014-04-28 21:06:51 +0000
committerrubidium <rubidium@openttd.org>2014-04-28 21:06:51 +0000
commitb476086c394c6bcf893f292ef67565ef2b5496a2 (patch)
tree7bbdfcc4597cae1378070d82c5da36c8668171e0 /src/video/cocoa
parent3b634b628c8b8ce30cdd11d38a38cf2f455a1c73 (diff)
downloadopenttd-b476086c394c6bcf893f292ef67565ef2b5496a2.tar.xz
(svn r26538) -Codechange: remove double accounting of the drivers
Diffstat (limited to 'src/video/cocoa')
-rw-r--r--src/video/cocoa/cocoa_v.mm6
-rw-r--r--src/video/cocoa/event.mm2
2 files changed, 4 insertions, 4 deletions
diff --git a/src/video/cocoa/cocoa_v.mm b/src/video/cocoa/cocoa_v.mm
index d87fa10b2..5665abb5b 100644
--- a/src/video/cocoa/cocoa_v.mm
+++ b/src/video/cocoa/cocoa_v.mm
@@ -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;
}
diff --git a/src/video/cocoa/event.mm b/src/video/cocoa/event.mm
index b4f171a98..78785f8d0 100644
--- a/src/video/cocoa/event.mm
+++ b/src/video/cocoa/event.mm
@@ -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;
}