mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-14 01:55:19 -04:00
Use undocumented methods to get CGS connection and window id for 32 bit macos
This commit is contained in:
parent
7546347e4c
commit
54962a0e07
12
src/Window.c
12
src/Window.c
@ -2109,6 +2109,15 @@ static void Window_ConnectEvents(void) {
|
||||
*#########################################################################################################################*/
|
||||
void Window_Init(void) { Window_CommonInit(); }
|
||||
|
||||
/* Private CGS/CGL stuff */
|
||||
typedef int CGSConnectionID;
|
||||
extern CGSConnectionID _CGSDefaultConnection(void);
|
||||
extern CGWindowID GetNativeWindowFromWindowRef(WindowRef window);
|
||||
extern CGContextRef CGWindowContextCreate(CGSConnectionID conn, CGWindowID win, void* opts);
|
||||
|
||||
static CGSConnectionID conn;
|
||||
static CGWindowID winId;
|
||||
|
||||
void Window_Create(int width, int height) {
|
||||
Rect r;
|
||||
OSStatus res;
|
||||
@ -2131,6 +2140,9 @@ void Window_Create(int width, int height) {
|
||||
Window_ConnectEvents();
|
||||
Window_CommonCreate();
|
||||
Window_Handle = win_handle;
|
||||
|
||||
conn = _CGSDefaultConnection();
|
||||
winId = GetNativeWindowFromWindowRef(win_handle);
|
||||
}
|
||||
|
||||
void Window_SetTitle(const String* title) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user