diff options
author | Michael Lutz <michi@icosahedron.de> | 2021-01-30 19:13:29 +0100 |
---|---|---|
committer | Michael Lutz <michi@icosahedron.de> | 2021-02-13 22:21:17 +0100 |
commit | 8aaf4ea0987a361e5d4f7b690544ee9119746660 (patch) | |
tree | b7f29c2f7f630289a251deae9d4521e5be32d0e9 /src/video/cocoa/cocoa_v.h | |
parent | 0eff7de6594b0b0cb451a992287239b04eb66fc4 (diff) | |
download | openttd-8aaf4ea0987a361e5d4f7b690544ee9119746660.tar.xz |
Codechange: [OSX] Split Window and back buffer creation in Cocoa video driver.
Diffstat (limited to 'src/video/cocoa/cocoa_v.h')
-rw-r--r-- | src/video/cocoa/cocoa_v.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/video/cocoa/cocoa_v.h b/src/video/cocoa/cocoa_v.h index f9920c20e..0961e1660 100644 --- a/src/video/cocoa/cocoa_v.h +++ b/src/video/cocoa/cocoa_v.h @@ -16,13 +16,12 @@ extern bool _cocoa_video_started; +@class OTTD_CocoaWindowDelegate; + class VideoDriver_Cocoa : public VideoDriver { private: Dimension orig_res; ///< Saved window size for non-fullscreen mode. - int device_width; ///< Width of device in pixel - int device_height; ///< Height of device in pixel - int window_width; ///< Current window width in pixel int window_height; ///< Current window height in pixel int window_pitch; @@ -46,6 +45,8 @@ public: CGColorSpaceRef color_space; ///< Window color space CGContextRef cgcontext; ///< Context reference for Quartz subdriver + OTTD_CocoaWindowDelegate *delegate; //!< Window delegate object + public: VideoDriver_Cocoa(); @@ -69,7 +70,7 @@ public: /** Main game loop. */ void GameLoop(); // In event.mm. - bool WindowResized(); + void AllocateBackingStore(); protected: Dimension GetScreenSize() const override; @@ -85,8 +86,8 @@ private: void GameSizeChanged(); void UpdateVideoModes(); - void GetDeviceInfo(); - bool SetVideoMode(int width, int height, int bpp); + + bool MakeWindow(int width, int height); void UpdatePalette(uint first_color, uint num_colors); void CheckPaletteAnim(); |