Multitasking on iOS

Hi,

Right now SDL sends SDL_WINDOWEVENT_MINIMIZED to all open windows when
the application transitions to the background. However this event can
only be handled after the application restored from the background
again, which makes this quite useless. I suppose the same longjump hack
as for applicationWillTerminate might be necessary here.

Generally this however raises the problem that there is a lot of iOS
specific stuff that does not map too well to regular SDL. What’s
currently the recommended way to hook into these lower level things
without having to modify SDL code?

Regards,
Armin

Hi,

In related news: env/jump_env are not prefixed with SDL but still
nonstatic identifiers which might cause problems.

Regards,
Armin

this is certainly a problem.

I’m still thinking that there should be a separate (but similar!) API for mobile devices. Their needs and the way that they work at the API-level are just too different.------------------------
EM3 Nathaniel Fries, U.S. Navy

http://natefries.net/

Hi, correct me if I’m wrong, but the program receives the minimize Window Event when you return to the home screen; try to write something to the log screen to verify this :stuck_out_tongue:

I’m pretty sure, I just checked before writing this reply. I think it’s more of a problem with the xcode debugger, at least with v4.

Nathaniel J Fries wrote:

this is certainly a problem.

I’m still thinking that there should be a separate (but similar!) API for mobile devices. Their needs and the way that they work at the API-level are just too different.

YES! There are several details that get lost in the default SDL API. For instance, I hacked in a function pointer that gets called for low memory situations on iOS, which are otherwise ignored by SDL. I think we’d all agree that fracturing the API would be I’ll advised, but maybe something more like the GL attribute interface.

Code:

if(SDL_OS_HasAttribute(SDL_OS_LOWMEMORYHANDLER))
SDL_OS_SetAttribute(SDL_OS_LOWMEMORYHANDLER, mylowmemhandler);

Hi,On 5/7/11 3:26 AM, eclectocrat wrote:

YES! There are several details that get lost in the default SDL API. For
instance, I hacked in a function pointer that gets called for low memory
situations on iOS, which are otherwise ignored by SDL. I think we’d all
agree that fracturing the API would be I’ll advised, but maybe something
more like the GL attribute interface.
This. Also the currently iOS custom functions should really become part
of an alternative operating system API. There is nothing special about
the iOS keyboard, the android one is suppose to be equivalent.

Regards,
Armin

i agree, there should be an additional set of flags that target only mobile
devices
I would vote for adding SDL_WINDOW_ROTATION_LANDSCAPE and
SDL_WINDOW_ROTATION_PORTRAIT to select in which direction the window is
allowed to rotate

VittorioOn Sat, May 7, 2011 at 3:26 AM, eclectocrat wrote:

Nathaniel J Fries wrote:

this is certainly a problem.

I’m still thinking that there should be a separate (but similar!) API for
mobile devices. Their needs and the way that they work at the API-level are
just too different.

YES! There are several details that get lost in the default SDL API. For
instance, I hacked in a function pointer that gets called for low memory
situations on iOS, which are otherwise ignored by SDL. I think we’d all
agree that fracturing the API would be I’ll advised, but maybe something
more like the GL attribute interface.

Code:

if(SDL_OS_HasAttribute(SDL_OS_LOWMEMORYHANDLER))
SDL_OS_SetAttribute(SDL_OS_LOWMEMORYHANDLER, mylowmemhandler);


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