Fullscreen Windows

Desktop vs Exclusive Fullscreen

Why would we want to use desktop fullscreen mode if exclusive fullscreen has better performance?

Abstract art representing computer programming

While exclusive fullscreen mode can offer better performance, desktop fullscreen (also called borderless fullscreen) provides several important advantages that often make it the preferred choice for modern games.

Faster Alt+Tab Switching

When using exclusive fullscreen, switching between applications takes several seconds as the display mode needs to change each time. With desktop fullscreen, players can instantly switch between your game and other applications, providing a much smoother multitasking experience.

Multiple Monitor Support

Desktop fullscreen works better with multiple monitors. Players can interact with other applications on their secondary monitors while your game runs on the primary display. In exclusive fullscreen, switching focus away from the game often minimizes it or causes display flickering on all monitors.

Stream Compatibility

Desktop fullscreen works more reliably with streaming software like OBS or Discord's screen sharing. Exclusive fullscreen can sometimes cause capture issues or black screens.

Here's how you might implement a configuration option for this:

#include <SDL.h>
#include <iostream>

enum class FullscreenMode {
  Windowed,
  Desktop,
  Exclusive
};

void SetFullscreenMode(
  SDL_Window* Window,
  FullscreenMode Mode
) {
  switch (Mode) {
    case FullscreenMode::Windowed:
      SDL_SetWindowFullscreen(Window, 0);
      break;
    case FullscreenMode::Desktop:
      SDL_SetWindowFullscreen(Window,
        SDL_WINDOW_FULLSCREEN_DESKTOP);
      break;
    case FullscreenMode::Exclusive:
      SDL_SetWindowFullscreen(Window,
        SDL_WINDOW_FULLSCREEN);
      break;
  }
}

The performance difference between the modes is often minimal on modern systems, so many players prefer the convenience of desktop fullscreen over the slight performance advantage of exclusive fullscreen.

This Question is from the Lesson:

Fullscreen Windows

Learn how to create and manage fullscreen windows in SDL, including desktop and exclusive fullscreen modes.

Answers to questions are automatically generated and may not have been reviewed.

This Question is from the Lesson:

Fullscreen Windows

Learn how to create and manage fullscreen windows in SDL, including desktop and exclusive fullscreen modes.

sdl2-promo.jpg
Part of the course:

Game Dev with SDL2

Learn C++ and SDL development by creating hands on, practical projects inspired by classic retro games

Free, unlimited access

This course includes:

  • 71 Lessons
  • 100+ Code Samples
  • 91% Positive Reviews
  • Regularly Updated
  • Help and FAQ
Free, Unlimited Access

Professional C++

Comprehensive course covering advanced concepts, and how to use them on large-scale projects.

Screenshot from Warhammer: Total War
Screenshot from Tomb Raider
Screenshot from Jedi: Fallen Order
Contact|Privacy Policy|Terms of Use
Copyright © 2024 - All Rights Reserved