Function SDL_AddHintCallback
pub unsafe extern "C" fn SDL_AddHintCallback(
name: *const i8,
callback: Option<unsafe extern "C" fn(_: *mut c_void, _: *const i8, _: *const i8, _: *const i8)>,
userdata: *mut c_void,
) -> bool
Available on crate feature
dep_sdl3
only.Expand description
Add a function to watch a particular hint.
The callback function is called during this function, to provide it an initial value, and again each time the hint’s value changes.
§Parameters
name
: the hint to watch.callback
: AnSDL_HintCallback
function that will be called when the hint value changes.userdata
: a pointer to pass to the callback function.
§Return value
Returns true on success or false on failure; call SDL_GetError()
for more
information.
§Thread safety
It is safe to call this function from any thread.
§Availability
This function is available since SDL 3.2.0.