SDL_HINT_MOUSE_TOUCH_EVENTS(3)
π SDL_HINT_MOUSE_TOUCH_EVENTS π
okay bestie, welcome to the SDL3 FUNCTIONS corner of the manual, where today's main character is literally called SDL_HINT_MOUSE_TOUCH_EVENTS and she is here to answer one very important question: should your mouse be out here pretending to be a finger?? π«Ά
β¨ NAME β¨
SDL_HINT_MOUSE_TOUCH_EVENTS β a variable controlling whether mouse events should generate synthetic touch events. yes fr fr, your mouse can catfish as a touchscreen. it's giving shapeshifter π
π SYNOPSIS π
#include <SDL3/SDL_hints.h>
#define SDL_HINT_MOUSE_TOUCH_EVENTS "SDL_MOUSE_TOUCH_EVENTS"
that's it. that's the whole vibe. one include, one #define, zero drama. β¨
πΈ DESCRIPTION πΈ
so the variable can be set to the following values, and ngl there are exactly two of them, so this is a quick little vibe check:
- "0" β mouse events will not generate touch events. (this is the default for desktop platforms, so like, your laptop is sitting there like "I'm a mouse and I'm proud of it" π±οΈ)
- "1" β mouse events will generate touch events. (this is the default for mobile platforms, such as Android and iOS, because bestie, over there the finger is the whole personality π±π)
lowkey the most important thing: this hint can be set anytime. no "set it before init or else" nonsense, no cursed timing rules, just set it whenever and go. iconic behaviour tbh π
π AVAILABILITY π
this hint is available since SDL 3.2.0. so if you're on anything older, she does not exist yet and you are on your own, bestie π
and that's the whole page!! every flag, every default, every platform named, no skips, no gatekeeping π§
this adorable little slice of documentation came to you from Simple Directmedia Layer, version SDL 3.4.18, and yes it's the SDL_HINT_MOUSE_TOUCH_EVENTS(3) page, mwah π
stay hydrated, set your hints, and remember: your mouse does not have to be a finger unless you say so. periodt. π ππ¦
π¦ where this page comes from
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms