SDL_HINT_MAC_SCROLL_MOMENTUM(3)

πŸ’– SDL_HINT_MAC_SCROLL_MOMENTUM πŸ’–

okay bestie, welcome to the SDL_HINT_MAC_SCROLL_MOMENTUM page, part of the SDL3 functions era, and no cap this one is short but iconic ✨


🌸 NAME 🌸

SDL_HINT_MAC_SCROLL_MOMENTUM β€” a variable controlling whether SDL_EVENT_MOUSE_WHEEL event values will have momentum on macOS. πŸ¦‹


✨ SYNOPSIS ✨

#include <SDL3/SDL_hints.h>

#define SDL_HINT_MAC_SCROLL_MOMENTUM "SDL_MAC_SCROLL_MOMENTUM"

like, that's the whole thing, she's a one-liner define and she's thriving πŸ’…


πŸŽ€ DESCRIPTION πŸŽ€

So the variable can be set to the following values, and you literally just pick one:

  • "0" β€” the mouse wheel events will have no momentum. this is the default, the chill one, the no-frills vibe πŸ“
  • "1" β€” the mouse wheel events will have momentum. the main character energy option, the flick-and-glide 😭
⚠️ lowkey important: this hint needs to be set before SDL_Init(). if you set it after, it's giving too late bestie, the vibe check already happened πŸ™ˆ

🌈 AVAILABILITY 🌈

This hint is available since SDL 3.2.0. so if you're on something older, it's not her, she simply wasn't born yet πŸ’€


and that's the whole page, fr fr 🫢

sign-off time: this lil beauty lives in Simple Directmedia Layer, shipping as SDL 3.4.18, straight out of the SDL_HINT_MAC_SCROLL_MOMENTUM(3) manual. obsessed with her, periodt πŸ‘‘πŸ’œ

πŸ“¦ where this page comes from