Mercurial > sdl-ios-xcode
comparison src/video/win32/SDL_win32window.c @ 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 | c8f11c4ced7d |
children |
comparison
equal
deleted
inserted
replaced
5055:2936fc46b015 | 5056:8b7988f42fcb |
---|---|
547 WIN_GetWindowWMInfo(_THIS, SDL_Window * window, SDL_SysWMinfo * info) | 547 WIN_GetWindowWMInfo(_THIS, SDL_Window * window, SDL_SysWMinfo * info) |
548 { | 548 { |
549 HWND hwnd = ((SDL_WindowData *) window->driverdata)->hwnd; | 549 HWND hwnd = ((SDL_WindowData *) window->driverdata)->hwnd; |
550 if (info->version.major <= SDL_MAJOR_VERSION) { | 550 if (info->version.major <= SDL_MAJOR_VERSION) { |
551 info->subsystem = SDL_SYSWM_WINDOWS; | 551 info->subsystem = SDL_SYSWM_WINDOWS; |
552 info->win.window = hwnd; | 552 info->info.win.window = hwnd; |
553 return SDL_TRUE; | 553 return SDL_TRUE; |
554 } else { | 554 } else { |
555 SDL_SetError("Application not compiled with SDL %d.%d\n", | 555 SDL_SetError("Application not compiled with SDL %d.%d\n", |
556 SDL_MAJOR_VERSION, SDL_MINOR_VERSION); | 556 SDL_MAJOR_VERSION, SDL_MINOR_VERSION); |
557 return SDL_FALSE; | 557 return SDL_FALSE; |