SDL_HINT_VID..._MODE_ON_MOVE(3)

πŸ“¦
version 3.4.18 Β· 5 versions
, in fedora 43, fedora 44

πŸ’– SDL_HINT_VIDEO_MATCH_EXCLUSIVE_MODE_ON_MOVE πŸ’–

okay bestie, welcome to the SDL3 FUNCTIONS manual, page SDL_HINT_VID..._MODE_ON_MOVE(3) ✨ β€” yes the title got squished by the terminal, it's giving "my name is too long for the header" energy, but we move.


πŸŽ€ NAME πŸŽ€

SDL_HINT_VIDEO_MATCH_EXCLUSIVE_MODE_ON_MOVE β€” a variable that controls whether SDL will attempt to automatically set the destination display to a mode most closely matching that of the previous display if an exclusive fullscreen window is moved onto it. πŸ¦‹


✨ SYNOPSIS ✨

#include <SDL3/SDL_hints.h>

#define SDL_HINT_VIDEO_MATCH_EXCLUSIVE_MODE_ON_MOVE "SDL_VIDEO_MATCH_EXCLUSIVE_MODE_ON_MOVE"

like, that's the whole thing. no extra params, no secret args, just a #define and a header. slay. πŸ’…


🌸 DESCRIPTION 🌸

so the variable can be set to the following values, and ngl both of them are valid life choices:

  • "0" β€” SDL will not attempt to automatically set a matching mode on the destination display. If an exclusive fullscreen window is moved to a new display, the window will become fullscreen desktop. (lowkey the "just let it be" option 🫢)
  • "1" β€” SDL will attempt to automatically set a mode on the destination display that most closely matches the mode of the display that the exclusive fullscreen window was previously on. (default) πŸ‘‘
bestie the (default) is on "1", not "0". don't get it twisted. πŸ™ˆ

This hint can be set anytime. ⏰ no timing gatekeeping, no "only before init" nonsense. iconic behaviour fr fr.


🌈 AVAILABILITY 🌈

This hint is available since SDL 3.4.0. πŸŽ‚ so if you're on something older, it's not ghosting you, it literally does not exist yet. 😭


and that's the whole page, bestie!! go forth and move your exclusive fullscreen windows between displays with main character energy πŸ‘‘βœ¨πŸ’œ

sourced from the Simple Directmedia Layer crew, SDL 3.4.18, dated right there on the SDL_HINT_VID..._MODE_ON_MOVE(3) footer β€” ty for coming to my ted talk, ily, bye πŸŽ€πŸ¦‹πŸ’–

πŸ“¦ where this page comes from