2013/1/14, Giorgos Sarris :
Hi to all,
Today I have tried: SDL_WINDOW_FULLSCREEN_DESKTOP in mac os x and I have
Sigh. Mac fullscreen has been on the back of my mind since 10.7. I
wish I had more time But I’ll share what I know with everybody.
10.7 changed things (again) with respect to fullscreen. 10.8
interestingly didn’t change anything for fullscreen which might be a a
first for Apple. This might mean they are finally committed to
sticking to a path. But either way, I have been playing some SDL based
games on my Mac and the fullscreen behavior has been really annoying
me. Most of the time I’m trapped in fullscreen and can’t get out via
the normal expected ways without quitting the app. This is very
annoying for things like checking email or chat when new things come
in or I need a web browser to figure out how to cheat :P.
The expected ways are now:
- 4 finger swipe on trackpad to switch out of the app’s fullscreen space
- click the fullscreen button in the right-top corner by bringing down
the menu via mouse push against the top
- alt-tab or other task switching
- (more optional) double drag Dock egde with mouse to unhide Dock and
click on some other app
- When there are 2 monitors avaialble the second one shows mac os
SDL_WINDOW_FULLSCREEN shows black on the second one but this is no
I think the new behavior is supposed to make your main screen the
fullscreen one (the main screen is the one designated with the menu
bar), and the other screen remains a normal desktop with windows and
stuff. I don’t think it is supposed to go black any more.
- There is no fading out/in effects like SDL_WINDOW_FULLSCREEN but this
I think fade is dead. Apple now recommends a slide-transition with
live-resizing animation. However, this is optional.
- When in full screen and try to open another application from within the
app (eg: browser) it minimizes the sdl application/game and runs the other
app (browser). This seems ok but its not that useful when eg: In a game we
sell something through Apple’s in-app ability. In this case the game will
minimize an a tiny popup window will ask you if you want to buy the in-app
item. It doesn’t look very nice, I personally think that the window should
not minimize and the popup’s should go above it.
#3: it’s normal behavior for a fullscreen program to minimize when
switching away since, well, the program is not the focus anymore. Why
would you use a separate program to prompt for an in-app purchase,
though? Shouldn’t that be integrated into your own program?
No, your app should never minimize automatically. (Minimize means the
window does that Genie effect and tucks into the Dock.) If another app
launches, you should now transition out of the fullscreen space to the
other app’s space.
Note that an In-App Purchase should still be your own process and not
another app. You can do this either in your existing main window
(Apple’s In-App Purchase has no UI and it is up to you to figure out
how to present/render.) Or you can create a different window. Apple
allows you to create accessory windows that work with the fullscreen
window so you don’t transition out of the space. If you don’t do the
accessory window thing, then the window that gets created will
transition you out of the fullscreen space to bring up your window
while your fullscreen window continues to be up/active in the
I haven’t given any thought about how to expose these properties to
the SDL window API.
- In a fullscreen game we hide the system cursor to show our own right?
I use SDL_ShowCursor(SDL_DISABLE);
In the same example as above when the in-app purchase popup windows shows
after the application has minimized there is no cursor (because we have
disabled it) and we have to click somewhere to see it, but with that click
the popup disappears.
What is the correct way to fix this?
SDL_ShowCursor(SDL_ENABLE) everytime we popup something and then on_focus,
SDL_DISABLE the cursor again?
#4: yeah, do that. You probably want to do that anyway since the game
screen isn’t focused anymore, thereby it shouldn’t mess with the
cursor in the first place. No idea why the cursor doesn’t get restored
when the window loses focus though, if that’s indeed what happens then
that looks like a SDL bug.
Not necessarily. The normal cursor should still work in fullscreen. I
don’t know anything about the cursor bug you are seeing.
EricOn 1/14/13, Sik the hedgehog <sik.the.hedgehog at gmail.com> wrote:
Beginning iPhone Games Development