Hello everybody, could you please help me with scailing, fullscreen mode and else: I am doing game for portrait view of phones so I have maximum view Width of 800 px. So when I test my game on computer of 1280:1024 in full screen it looks normally (can't make a screenshot, so explain here: right resolution and black bars in fullscreen ) and works properly, but I want to add exit to fullscreen mode to have the game in original size streched to display properties, so in my case it's maximum width and minimum Height its all calculated properly but I don't know how to realize it. Here is my code:
Escape pressed:
window_set_fullscreen(false);
surface_resize(application_surface,viewW,viewH);
display_set_gui_size(viewW,viewH);
window_set_size(viewW,viewH);
alarm[0]=1;//Center window
But when I press Escape my game leaves fullscreenmode and becomes even more streched in width axis and nothing works, I mean buttons aren't pressing and else.
The picture of this is screenshot 1.
But strangely when I press on game tab on windows panel the game hides and comes back with proper width and height, black bars and working buttons and else, thats screenshot 2.
Could you please reccomend me a better code of exiting fullscreen mode or help with my problem.
Escape pressed:
window_set_fullscreen(false);
surface_resize(application_surface,viewW,viewH);
display_set_gui_size(viewW,viewH);
window_set_size(viewW,viewH);
alarm[0]=1;//Center window
But when I press Escape my game leaves fullscreenmode and becomes even more streched in width axis and nothing works, I mean buttons aren't pressing and else.
The picture of this is screenshot 1.
But strangely when I press on game tab on windows panel the game hides and comes back with proper width and height, black bars and working buttons and else, thats screenshot 2.
Could you please reccomend me a better code of exiting fullscreen mode or help with my problem.
Attachments
-
88 KB Views: 4
-
89.3 KB Views: 4