sdl with a native ui on the iphone is easier than you may think

Posts: 27
Joined: 2010.01
Post: #1
Now that we've finally found the time to post some of our code to the ffmpeg4iphone project that we have been contrbuting to, it makes it a lot easier to illustrate techniques.

Here is our common.m and common.h files.

The two methods to look at here are

Switch windows which switch between and iphone uiwindow and an sdl full screen window and iphonepump messages which run a cfrunloop to restore tableview click functionality lost after returning from the sdl function.

void iPhonePumpMessages()

//printf("runloop return %u\n",CFRunLoopRunInMode(kCFRunLoopDefaultMode, 1, TRUE));
CFRunLoopRunInMode(kCFRunLoopDefaultMode, 1, TRUE);

void switchWindows() {

SDLUIKitDelegate *appDelegate = [SDLUIKitDelegate sharedAppDelegate];
NSLog(@"switch windows");
[appDelegate switchTopWindow];

And the appdelegate looks like this

-(void) switchTopWindow {
NSLog(@"making uiwindw key window");
[myWindow makeKeyAndVisible];
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  iPhone native graphics format DaveJ 2 8,965 Dec 26, 2012 12:44 PM
Last Post: mdejong1024
  Easier Plotting sinclair44 6 8,302 Jun 18, 2002 02:24 PM
Last Post: sinclair44
  Confusion about native pixel format tigakub 3 8,003 May 14, 2002 02:45 PM
Last Post: OneSadCookie