On Mac OS X, when I call love.graphics.toggleFullscreen() I get a fancy fade-to-black-and-back effect that takes about a second. However, I suspect my game is still updating during this transition.
Is there a way to detect whether or not Löve is still doing the fullscreen toggle so that I may properly pause my game?
Delay when toggling fullscreen; updates still happening
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
- AaronWizard
- Citizen
- Posts: 68
- Joined: Sun Nov 06, 2011 2:45 pm
- Location: Canada
Re: Delay when toggling fullscreen; updates still happening
If there ends up being no such way to do what you asked, you could just politely pause the game anyway when the user attempts to go fullscreen. I always expect a minor delay when I go into or out of fullscreen mode in games, and I usually expect to only be able to toggle fullscreen mode when in a menu. If you're letting me to do this outside of a game menu I don't think I'd be upset if you auto-paused the game to account for the fade-to-black-and-back.
Have you met the Child of Winter?
- Jasoco
- Inner party member
- Posts: 3725
- Joined: Mon Jun 22, 2009 9:35 am
- Location: Pennsylvania, USA
- Contact:
Re: Delay when toggling fullscreen; updates still happening
This is why I don't set fullscreen to a specific resolution and instead set it to the exact size of the display then use either a canvas with scaling or love.graphics.scale, translate and setScissor to scale it up to the full size. There's no delay for the most part and it's more compatible in that it's 100% compatible with every display whereas if you try to use a resolution on a display that doesn't support that resolution, you might get stuck with a blank screen. My method is a little more work, but not really once it's all said and done.
That said, you probably shouldn't be letting the player set the fullscreen option while the game is running. This should be handled in a menu where it doesn't matter if a few frames are missed. If you're going to have a key to toggle it, just pause the game before setting it as a workaround. Then again, a lot of games these days simply follow my method of scaling the content to the full resolution instead of changing the resolution.
That said, you probably shouldn't be letting the player set the fullscreen option while the game is running. This should be handled in a menu where it doesn't matter if a few frames are missed. If you're going to have a key to toggle it, just pause the game before setting it as a workaround. Then again, a lot of games these days simply follow my method of scaling the content to the full resolution instead of changing the resolution.
- AaronWizard
- Citizen
- Posts: 68
- Joined: Sun Nov 06, 2011 2:45 pm
- Location: Canada
Re: Delay when toggling fullscreen; updates still happening
Yeah, I've move fullscreen and other screen options to the options menu you get at the title screen since making this post.Jasoco wrote:That said, you probably shouldn't be letting the player set the fullscreen option while the game is running. This should be handled in a menu where it doesn't matter if a few frames are missed.
Then again, I didn't have a title screen when I made this post.
Who is online
Users browsing this forum: darkfrei and 218 guests