From 88f6c7a9f353c3e78f30ddeaaeef91694af4d189 Mon Sep 17 00:00:00 2001 From: Michael Lutz Date: Fri, 22 Jan 2021 22:29:46 +0100 Subject: Codechange: [OSX] Fold remaining Cocoa video subdriver into the main driver. --- src/video/cocoa/cocoa_wnd.mm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/video/cocoa/cocoa_wnd.mm') diff --git a/src/video/cocoa/cocoa_wnd.mm b/src/video/cocoa/cocoa_wnd.mm index 256565b2b..ff222ea42 100644 --- a/src/video/cocoa/cocoa_wnd.mm +++ b/src/video/cocoa/cocoa_wnd.mm @@ -70,7 +70,7 @@ static OTTDMain *_ottd_main; - (void)launchGameEngine: (NSNotification*) note { /* Setup cursor for the current _game_mode. */ - [ _cocoa_subdriver->cocoaview resetCursorRects ]; + [ static_cast(VideoDriver::GetInstance())->cocoaview resetCursorRects ]; /* Hand off to main application code. */ static_cast(VideoDriver::GetInstance())->GameLoop(); @@ -282,7 +282,7 @@ void CocoaDialog(const char *title, const char *message, const char *buttonLabel @implementation OTTD_CocoaWindow -- (void)setDriver:(WindowQuartzSubdriver *)drv +- (void)setDriver:(VideoDriver_Cocoa *)drv { driver = drv; } @@ -404,7 +404,7 @@ static const char *Utf8AdvanceByUtf16Units(const char *str, NSUInteger count) /** * Initialize the driver */ -- (void)setDriver:(WindowQuartzSubdriver *)drv +- (void)setDriver:(VideoDriver_Cocoa *)drv { driver = drv; } @@ -491,7 +491,7 @@ static const char *Utf8AdvanceByUtf16Units(const char *str, NSUInteger count) */ - (void)mouseExited:(NSEvent *)theEvent { - if (_cocoa_subdriver != NULL) UndrawMouseCursor(); + if (driver->window != nil) UndrawMouseCursor(); _cursor.in_window = false; } @@ -810,7 +810,7 @@ static const char *Utf8AdvanceByUtf16Units(const char *str, NSUInteger count) @implementation OTTD_CocoaWindowDelegate /** Initialize the video driver */ -- (void)setDriver:(WindowQuartzSubdriver *)drv +- (void)setDriver:(VideoDriver_Cocoa *)drv { driver = drv; } -- cgit v1.2.3-70-g09d2