Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change allegro graphic to full screen in execution time #1106

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

saisilcastro
Copy link

I am updating my engine while developing my game menu. I use two libraries to manipulate the engine. One of them is allegro 5.2.5. I am trying to change the graphic mode in execution time but until now I could not. I've tried to use al_toggle_display_flag, al_set_display_flag and other functions, but none of them is able to change from window screen to fullscreen and vice-versa.
It could be really good to have a function like al_set_window_fullscreen which could be able to change the window mode in execution time.
Thanks for the attention.

Lísias de Castro Martins

@elias-pschernig
Copy link
Member

You can already use this:

al_set_display_flag(display, ALLEGRO_FULLSCREEN_WINDOW, true)

However it will not change the monitor resolution, just set your window to be fullscreen. I agree that a way to modify the monitor resolution without recreating the window would also be useful (even if internally it will have to re-create the window anyway).

@saisilcastro
Copy link
Author

I have tried this one. But the screen does not keep centered compared to the "real" fullscreen mode neither stretch the screen in order to show the whole image "closer" than the higher resolution. It makes the application appearance weird. Is there some way in order to make this with this function?

@saisilcastro
Copy link
Author

Ah, about the version, that was my mistake. I am using the 5.2.5 version, not the 5.2.4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants