mirror of
https://github.com/yawut/SDL.git
synced 2026-08-20 07:44:03 -05:00
Fixed bug 731 - No mechanism to extract the NSView for 3d library
This commit is contained in:
@@ -82,6 +82,7 @@ struct SDL_SysWMinfo;
|
||||
#include <Cocoa/Cocoa.h>
|
||||
#else
|
||||
typedef struct _NSWindow NSWindow;
|
||||
typedef struct _NSView NSView;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -187,6 +188,7 @@ struct SDL_SysWMinfo
|
||||
struct
|
||||
{
|
||||
NSWindow *window; /* The Cocoa window */
|
||||
NSView *view; /* The Cocoa view */
|
||||
} cocoa;
|
||||
#endif
|
||||
#if defined(SDL_VIDEO_DRIVER_UIKIT)
|
||||
|
||||
@@ -1131,6 +1131,7 @@ Cocoa_GetWindowWMInfo(_THIS, SDL_Window * window, SDL_SysWMinfo * info)
|
||||
if (info->version.major <= SDL_MAJOR_VERSION) {
|
||||
info->subsystem = SDL_SYSWM_COCOA;
|
||||
info->info.cocoa.window = nswindow;
|
||||
info->info.cocoa.view = [nswindow contentView];
|
||||
return SDL_TRUE;
|
||||
} else {
|
||||
SDL_SetError("Application not compiled with SDL %d.%d\n",
|
||||
|
||||
Reference in New Issue
Block a user