SFML

Started by
5 comments, last by ms75214 12 years, 1 month ago
Is there a way to stop sfml from fading in/fading out when going in/out of fullscreen mode?
Advertisement
Post SFML specific questions to the SFML forums: sfml-dev.org

My Gamedev Journal: 2D Game Making, the Easy Way

---(Old Blog, still has good info): 2dGameMaking
-----
"No one ever posts on that message board; it's too crowded." - Yoga Berra (sorta)


Is there a way to stop sfml from fading in/fading out when going in/out of fullscreen mode?

You're going to have to be more specific with your question. What is fading in and out when you switch to full screen?

In time the project grows, the ignorance of its devs it shows, with many a convoluted function, it plunges into deep compunction, the price of failure is high, Washu's mirth is nigh.


[quote name='ms75214' timestamp='1329664585' post='4914516']
Is there a way to stop sfml from fading in/fading out when going in/out of fullscreen mode?

You're going to have to be more specific with your question. What is fading in and out when you switch to full screen?
[/quote]

the whole screen, i think.



i think the code in question is here in SFML:

////////////////////////////////////////////////////////////
/// Set @window as the current fullscreen window
/// Change the screen resolution if needed according to @window and @fullscreenMode
////////////////////////////////////////////////////////////
- (void)setFullscreenWindow:(sfPrivWindow *)aWindow mode:(sf::VideoMode *)fullscreenMode
{
// If we have a fullscreen window and want to remove it
if (aWindow == nil && myFullscreenWrapper)
{
// Get the CoreGraphics display mode according to the desktop mode
CFDictionaryRef displayMode = CGDisplayBestModeForParameters ([sfPrivAppController primaryScreen],
myDesktopMode.BitsPerPixel,
myDesktopMode.Width,
myDesktopMode.Height,
NULL);

#if ENABLE_FADE_OPERATIONS
// Fade to black screen
[self doFadeOperation:FillScreen time:0.2f sync:true];
#endif

// Switch to the desktop display mode
CGDisplaySwitchToMode([sfPrivAppController primaryScreen], displayMode);

// Close the window
[[myFullscreenWrapper window] close];

// Show the menu bar
[NSMenu setMenuBarVisible:YES];

#if ENABLE_FADE_OPERATIONS
// Fade to normal screen
[self doFadeOperation:CleanScreen time:0.5f sync:true];
#endif
Looks like you could re-compile SFML with ENABLE_FADE_OPERATIONS undefined.

Looks like you could re-compile SFML with ENABLE_FADE_OPERATIONS undefined.


Yeah.

[quote name='FLeBlanc' timestamp='1329751068' post='4914825']
Looks like you could re-compile SFML with ENABLE_FADE_OPERATIONS undefined.


Yeah.
[/quote]

Actually, no. I'd set it to 0, not undefine it.

This topic is closed to new replies.

Advertisement