Make context_agl.h compatible with ObjC ARC code.

Helpful when working with OpenEmu.
This commit is contained in:
C.W. Betts 2020-10-12 16:38:47 -06:00 committed by GitHub
parent 43bafe1a12
commit 5344b44970
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -8,6 +8,7 @@
struct NSOpenGLContext;
struct NSOpenGLPixelFormat;
struct NSView;
#define __bridge
#endif
namespace GL {
@ -31,7 +32,7 @@ public:
std::unique_ptr<Context> CreateSharedContext(const WindowInfo& wi) override;
private:
ALWAYS_INLINE NSView* GetView() const { return static_cast<NSView*>(m_wi.window_handle); }
ALWAYS_INLINE NSView* GetView() const { return static_cast<NSView*>((__bridge NSView*)m_wi.window_handle); }
bool Initialize(const Version* versions_to_try, size_t num_versions_to_try);
bool CreateContext(NSOpenGLContext* share_context, int profile, bool make_current);