SDL 1.3 and entry points not in SDLMain

I’m working on a project with SDL that I’d like to run under Quartz windowing on the mac. I’ve seen the example using SDLMain in obj-c and it works great on my machine.

However, my particular issue requires that my process entry point is in my code, not SDLMain. I’ve heard that SDL 1.3 will allow this but I can’t find details anywhere.

Can anyone comment on this? Will it be possible to run in Quartz without SDLMain in 1.3? Any code examples that exist for 1.3 yet?

Thanks!

nickoneill wrote:

I’m working on a project with SDL that I’d like to run under Quartz windowing on the mac. I’ve seen the example using SDLMain in obj-c and it works great on my machine.

However, my particular issue requires that my process entry point is in my code, not SDLMain. I’ve heard that SDL 1.3 will allow this but I can’t find details anywhere.

Can anyone comment on this? Will it be possible to run in Quartz without SDLMain in 1.3? Any code examples that exist for 1.3 yet?

Thanks!

Fun fact: As long as your entry point is compliant to what is expected of you by the underlying operating system, SDLmain is not necessary. Simply do not link to it. This is true with Windows at least. My recommendation is to simply try it and see.
Also, if you’ve been developing a game with 1.2 so far, much of your SDL-dependent code will need to be changed. Sorry, but it’s true.------------------------
EM3 Nathaniel Fries, U.S. Navy

http://natefries.net/

It is true of Linux and the PlayStation Portable as well.

You’ll need to se the linker flags manually at least. using the flags specified
in sdl-config --libs will contain SDL_main. At least with 1.2. As there
doesn’t seem to be a PSP port for 1.3, I haven’t used it yet.________________________________
From: nfries88@yahoo.com (Nathaniel J Fries)
To: sdl at lists.libsdl.org
Sent: Wed, April 27, 2011 6:40:23 PM
Subject: Re: [SDL] SDL 1.3 and entry points not in SDLMain

nickoneill wrote:

I’m working on a project with SDL that I’d like to run under Quartz windowing on
the mac. I’ve seen the example using SDLMain in obj-c and it works great on my
machine.

However, my particular issue requires that my process entry point is in my code,
not SDLMain. I’ve heard that SDL 1.3 will allow this but I can’t find details
anywhere.

Can anyone comment on this? Will it be possible to run in Quartz without SDLMain
in 1.3? Any code examples that exist for 1.3 yet?

Thanks!

Fun fact: As long as your entry point is compliant to what is expected of you by
the underlying operating system, SDLmain is not necessary. Simply do not link to
it. This is true with Windows at least. My recommendation is to simply try it
and see.
Also, if you’ve been developing a game with 1.2 so far, much of your
SDL-dependent code will need to be changed. Sorry, but it’s true.


EM3 Nathaniel Fries, U.S. Navy

http://natefries.net/

Nathaniel J Fries wrote:

Fun fact: As long as your entry point is compliant to what is expected of you by the underlying operating system, SDLmain is not necessary. Simply do not link to it. This is true with Windows at least. My recommendation is to simply try it and see.
Also, if you’ve been developing a game with 1.2 so far, much of your SDL-dependent code will need to be changed. Sorry, but it’s true.

Oh, I’ve tried it and I get lots of NSAutoreleasePool errors. That’s a pretty standard issue message for SDL on osx if you haven’t used SDLMain. All the example code for SDL 1.2 for osx 10.6 uses SDLMain as well.

I don’t have a problem with changing code for SDL 1.3, I’m just interested in the capabilities of 1.3 where 1.2 falls short for me.