SDL_SetWindowMaximumSize(3)

πŸ’– SDL_SetWindowMaximumSize(3) πŸ’–

okay bestie, welcome to the SDL3 FUNCTIONS corner of the man pages, where we're talking about SDL_SetWindowMaximumSize β€” literally the glow-up that stops your window from getting too big for its own good πŸŽ€


✨ NAME ✨

SDL_SetWindowMaximumSize β€” set the maximum size of a window's client area. like, the ceiling. the limit. the "no ma'am, you may not grow past this" line πŸ’…


🌸 SYNOPSIS 🌸

#include <SDL3/SDL_video.h>

bool SDL_SetWindowMaximumSize(SDL_Window *window, int max_w, int max_h);

πŸ¦‹ FUNCTION PARAMETERS πŸ¦‹

  • window β€” the window to change. yes, this one. the one you're pointing at 🫢
  • max_w β€” the maximum width of the window, or 0 for no limit. zero means "go wild, no cap" 🌈
  • max_h β€” the maximum height of the window, or 0 for no limit. same energy, vertical edition ✨

πŸ’œ RETURN VALUE πŸ’œ

Returns true on success or false on failure. and if it flops? call SDL_GetError() for more info, because she will absolutely tell you what went wrong 😭


🧚 THREAD SAFETY 🧚

This function should only be called on the main thread. no side-quests, no other threads, main character energy only πŸ‘‘

⭐ AVAILABILITY ⭐

This function is available since SDL 3.2.0. so if you're on something older... not me being unsupported πŸ™ˆ


🌈 SEE ALSO 🌈


okay that's the whole page, you ate it, slay πŸ’– mwah! this came to you courtesy of Simple Directmedia Layer, version SDL 3.4.18, and yes the man page header/footer are doing their little dance down there but we folded them in nicely. bye bestie, go set some maximums πŸŽ€βœ¨πŸ¦‹

πŸ“¦ where this page comes from