[SDL] [SPAM] Toggling fullscreen at run time.

benang at cs.its.ac.id benang at cs.its.ac.id
Mon Aug 27 19:23:40 PDT 2007


Thanks a lot guys. I think maybe toggling between fullscreen and not is
not the best way to solve my problem after all. You see, in my game, I set
it always to be a fullscreen one. But inside the game, there will be an
option for the player to calibrate the touch screen. And this calibration
requires calling an external executable with system() function (I intend
to change it to fork()/exec() after this). This executable uses GTK for
it's GUI. If the game was called with the SDL_FULLSCREEN flag, it can't
show up because the game is always on top . But if I call it without the
SDL_FULLSCREEN flag,the calibration menu showed up. Actually the vendor
already gave me the source code for the calibration executable. So, any
idea to overcome this?

Thanks again.

Brian wrote:
> SDL_GetVideoSurface() is your friend. No need to store it globally
> yourself when SDL does it for you =)
> I don't know what the API for 1.3 will look like for this however...
>
>> Personally, I store the pointer to the actual display surface globally.
>> To
>> switch between full- and windowed modes, I call SDL_QuitSubSystem
>> (SDL_INIT_VIDEO), which (if I am not mistaking) does the video-cleanup
>> for
>> me. Then I just Initialize the video again, and re-open a display
>> surface,
>> with (or without) SDL_FULLSCREEN. This has worked just fine for me and
>> as
>> far as I can tell there has not been any problems, and I am able to
>> switch
>> between screenmodes without interrupting the program itself.
> _______________________________________________
> SDL mailing list
> SDL at lists.libsdl.org
> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
>


Fare thee well,
Bawenang R. P. P.

----------------
ERROR: Brain not found. Please insert a new brain!

“Do nothing which is of no use.” - Miyamoto Musashi.

"I live for my dream. And my dream is to live my life to the fullest."




More information about the SDL mailing list