SDL 1.3 on Snow Leopard and iPone SDK 3.12

View: New views
2 Messages — Rating Filter:   Alert me  

SDL 1.3 on Snow Leopard and iPone SDK 3.12

by pkouame :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
Hi folks -

Just wondering if anyone's had any success porting to the iPhone on Snow and 3.1.2.
My first attempts are not successful. The libs compile fine, but the demo programs either
put u a blank screen or (in the case of DemosIPhoneOS) just the SDL logo screen saying "Loading...".
No real crashes. I am following the iPhoneOS ReadMe and focusing on the Simulator first.

Granted these were quickie attempts, but given the announcements I thought 1.3 was
partially functional in that regard. I have just started tracing some of the calls to debug this
myself, just don't want to reinvent the wheel if it's not necessary...

Also, there is an "SDL_config_iphoneos.h" in the include directory. I tried pointing SDL_config.h to no
avail. The docs don't mention this, but just thought I would try since it made sense.

Anyway, looks like a nice library and I'm definitely up for putting it through its paces. Once I get the
thing to build that is...I have experience porting open source to the iPhone so I'm not a total
noob.

Hope it's something obvious. Oh the version of I have is SDL-1.3.0-5157...running on a Mac Pro with
10.6.1 and SDks 3.0+ ( I never reinstalled 2.* as I don't intend on supporting older versions) and I'm testing
on Simulator, a 2G, 3G and 3GS...

Thanks in advance, Patrice

_______________________________________________
SDL mailing list
SDL@...
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Re: SDL 1.3 on Snow Leopard and iPone SDK 3.12

by Sam Lantinga-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

It looks like Roger Willcocks figured this out:
http://bugzilla.libsdl.org/show_bug.cgi?id=847

appDidFinishLaunching is triggered before all the setup's complete. The easiest
fix is to arrange for another event to be sent when it's really ready, and run
SDL_main from there. Ref.
http://blog.rightsprite.com/2008/11/iphone-applicationdidfinishlaunching.html

SDL-1.3.0-4563/src/video/uikit/SDL_uikitappdelegate.m:



- (void)postFinishLaunch {

    /* run the user's application, passing argc and argv */
    int exit_status = SDL_main(forward_argc, forward_argv);

    /* free the memory we used to hold copies of argc and argv */
    int i;
    for (i=0; i<forward_argc; i++) {
        free(forward_argv[i]);
    }
    free(forward_argv);

    /* exit, passing the return status from the user's application */
    exit(exit_status);

}

- (void)applicationDidFinishLaunching:(UIApplication *)application {

    /* Set working directory to resource path */
    [[NSFileManager defaultManager] changeCurrentDirectoryPath: [[NSBundle
mainBundle] resourcePath]];

    [self performSelector:@selector(postFinishLaunch) withObject:nil
afterDelay:0.0];
}

On Tue, Oct 27, 2009 at 8:46 PM, pkouame <patrice.kouame@...> wrote:

> Hi folks -
>
> Just wondering if anyone's had any success porting to the iPhone on Snow and
> 3.1.2.
> My first attempts are not successful. The libs compile fine, but the demo
> programs either
> put u a blank screen or (in the case of DemosIPhoneOS) just the SDL logo
> screen saying "Loading...".
> No real crashes. I am following the iPhoneOS ReadMe and focusing on the
> Simulator first.
>
> Granted these were quickie attempts, but given the announcements I thought
> 1.3 was
> partially functional in that regard. I have just started tracing some of the
> calls to debug this
> myself, just don't want to reinvent the wheel if it's not necessary...
>
> Also, there is an "SDL_config_iphoneos.h" in the include directory. I tried
> pointing SDL_config.h to no
> avail. The docs don't mention this, but just thought I would try since it
> made sense.
>
> Anyway, looks like a nice library and I'm definitely up for putting it
> through its paces. Once I get the
> thing to build that is...I have experience porting open source to the iPhone
> so I'm not a total
> noob.
>
> Hope it's something obvious. Oh the version of I have is
> SDL-1.3.0-5157...running on a Mac Pro with
> 10.6.1 and SDks 3.0+ ( I never reinstalled 2.* as I don't intend on
> supporting older versions) and I'm testing
> on Simulator, a 2G, 3G and 3GS...
>
> Thanks in advance, Patrice
> _______________________________________________
> SDL mailing list
> SDL@...
> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
>
>



--
        -Sam Lantinga, Founder and President, Galaxy Gameworks LLC
_______________________________________________
SDL mailing list
SDL@...
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org