mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2024-11-26 23:55:40 +00:00
Make context_agl.h compatible with ObjC ARC code.
Helpful when working with OpenEmu.
This commit is contained in:
parent
43bafe1a12
commit
5344b44970
|
@ -8,6 +8,7 @@
|
||||||
struct NSOpenGLContext;
|
struct NSOpenGLContext;
|
||||||
struct NSOpenGLPixelFormat;
|
struct NSOpenGLPixelFormat;
|
||||||
struct NSView;
|
struct NSView;
|
||||||
|
#define __bridge
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace GL {
|
namespace GL {
|
||||||
|
@ -31,7 +32,7 @@ public:
|
||||||
std::unique_ptr<Context> CreateSharedContext(const WindowInfo& wi) override;
|
std::unique_ptr<Context> CreateSharedContext(const WindowInfo& wi) override;
|
||||||
|
|
||||||
private:
|
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 Initialize(const Version* versions_to_try, size_t num_versions_to_try);
|
||||||
bool CreateContext(NSOpenGLContext* share_context, int profile, bool make_current);
|
bool CreateContext(NSOpenGLContext* share_context, int profile, bool make_current);
|
||||||
|
@ -45,4 +46,4 @@ private:
|
||||||
void* m_opengl_module_handle = nullptr;
|
void* m_opengl_module_handle = nullptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace GL
|
} // namespace GL
|
||||||
|
|
Loading…
Reference in a new issue