MCPcopy Create free account
hub / github.com/SpartanJ/eepp / toggleFullscreen

Method toggleFullscreen

src/eepp/window/backend/SDL2/windowsdl2.cpp:547–568  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

545}
546
547void WindowSDL::toggleFullscreen() {
548 Log::info( "toggleFullscreen called: %s", isWindowed() ? "is windowed" : "is fullscreen" );
549
550 if ( isWindowed() ) {
551 mWinPos = getPosition();
552 mWindow.Maximized = isMaximized();
553 }
554
555 SDL_SetWindowFullscreen( mSDLWindow, isWindowed() ? SDL_WINDOW_FULLSCREEN_DESKTOP : 0 );
556
557 BitOp::setBitFlagValue( &mWindow.WindowConfig.Style, WindowStyle::Fullscreen,
558 isWindowed() ? 1 : 0 );
559
560 getCursorManager()->reload();
561
562 if ( isWindowed() ) {
563 setPosition( mWinPos.x, mWinPos.y );
564
565 if ( mWindow.Maximized )
566 maximize();
567 }
568}
569
570void WindowSDL::setTitle( const std::string& title ) {
571 if ( mWindow.WindowConfig.Title != title ) {

Callers 2

fullscreenToggleMethod · 0.80
inputMethod · 0.80

Calls 3

infoFunction · 0.85
setPositionFunction · 0.85
reloadMethod · 0.45

Tested by 1

inputMethod · 0.64