Hello! I'm puzzled about some aspects of these functions. I'm creating a game that doesn't use any special views, basically what happens in the 1024x768 room is what you see, and all you see. Here is what I think and please let me know if I'm doing it right:
window_center() is to be used WITHIN an alarm AFTER going from fullscreen mode to window mode, is that correct?
window_set_size(1024,768) is to be used when going from fullscreen to window mode. Is that correct? Or should it also be used when going to fullscreen? Oo Sounds silly but I don't know. Must be used always when going to window mode? Are there exceptions? Are there other uses?
(Extra question with regards to this: what is the best way when going from fullscreen to window mode -- to make sure that the window created is as big as it can be, while still keeping the aspect ratio of 4/3 (1024x768)? Seeing that people use different native resolutions...)
surface_resize -- when is that used? Is it used when going from fullscreen mode to window mode? Must I use it if I don't have any special surfaces used, only the application surface? Does the following make sense: surface_resize(application_surface1024,768)?
So having said all this, does this make sense:
CREATE EVENT
if (!ini_read_string("general","fullscreen","0"))
{
window_set_fullscreen(false);
window_set_size(1024,768);
surface_resize(application_surface,1024,768);
alarm[0]=1
}
else window_set_fullscreen(true);
ALARM 0
if !window_get_fullscreen()
{
window_center();
}
Am I doing it right? What am I missing?
Thanks in advance!
window_center() is to be used WITHIN an alarm AFTER going from fullscreen mode to window mode, is that correct?
window_set_size(1024,768) is to be used when going from fullscreen to window mode. Is that correct? Or should it also be used when going to fullscreen? Oo Sounds silly but I don't know. Must be used always when going to window mode? Are there exceptions? Are there other uses?
(Extra question with regards to this: what is the best way when going from fullscreen to window mode -- to make sure that the window created is as big as it can be, while still keeping the aspect ratio of 4/3 (1024x768)? Seeing that people use different native resolutions...)
surface_resize -- when is that used? Is it used when going from fullscreen mode to window mode? Must I use it if I don't have any special surfaces used, only the application surface? Does the following make sense: surface_resize(application_surface1024,768)?
So having said all this, does this make sense:
CREATE EVENT
if (!ini_read_string("general","fullscreen","0"))
{
window_set_fullscreen(false);
window_set_size(1024,768);
surface_resize(application_surface,1024,768);
alarm[0]=1
}
else window_set_fullscreen(true);
ALARM 0
if !window_get_fullscreen()
{
window_center();
}
Am I doing it right? What am I missing?
Thanks in advance!