comparison src/video/cocoa/SDL_cocoawindow.m @ 5056:8b7988f42fcb

Added the ability to get the UIKit window through the SDL API. You can also do this through the native API: UIWindow *window = [[UIApplication sharedApplication] keyWindow]; Also needed to name the union for events and window info.
author Sam Lantinga <slouken@libsdl.org>
date Thu, 20 Jan 2011 16:05:59 -0800
parents 24d44c7c4c63
children bdff53ed6c8b
comparison
equal deleted inserted replaced
5055:2936fc46b015 5056:8b7988f42fcb
745 { 745 {
746 NSWindow *nswindow = ((SDL_WindowData *) window->driverdata)->nswindow; 746 NSWindow *nswindow = ((SDL_WindowData *) window->driverdata)->nswindow;
747 747
748 if (info->version.major <= SDL_MAJOR_VERSION) { 748 if (info->version.major <= SDL_MAJOR_VERSION) {
749 info->subsystem = SDL_SYSWM_COCOA; 749 info->subsystem = SDL_SYSWM_COCOA;
750 info->cocoa.window = nswindow; 750 info->info.cocoa.window = nswindow;
751 return SDL_TRUE; 751 return SDL_TRUE;
752 } else { 752 } else {
753 SDL_SetError("Application not compiled with SDL %d.%d\n", 753 SDL_SetError("Application not compiled with SDL %d.%d\n",
754 SDL_MAJOR_VERSION, SDL_MINOR_VERSION); 754 SDL_MAJOR_VERSION, SDL_MINOR_VERSION);
755 return SDL_FALSE; 755 return SDL_FALSE;