Repository: libsdl-org/SDL
File: include/SDL3/SDL_hints.h (C/C++)

Code before:
 * A variable controlling whether raw keyboard events are used on Windows.
 *
 * The variable can be set to the following values:
 *
 * - "0": The Windows message loop is used for keyboard events. (default)
 * - "1": Low latency raw keyboard events are used.
 *
 * This hint can be set anytime.
 *
 * \since This hint is available since SDL 3.2.0.
 */
#define SDL_HINT_WINDOWS_RAW_KEYBOARD "SDL_WINDOWS_RAW_KEYBOARD"

/**
 * A variable controlling whether to block hotkeys when raw keyboard events are enabled.
 *
 * The variable can be set to the following values:
 *
 * - "0": Hotkeys are not blocked. (default)
 * - "1": Hotkeys are blocked.
 *
 * This hint can be set anytime.
 *
 * \since This hint is available since SDL 3.2.22.
 */
#define SDL_HINT_WINDOWS_RAW_KEYBOARD_NOHOTKEYS "SDL_WINDOWS_RAW_KEYBOARD_NOHOTKEYS"

/**
 * A variable controlling whether SDL uses Kernel Semaphores on Windows.
 *
 * Kernel Semaphores are inter-process and require a context switch on every
 * interaction. On Windows 8 and newer, the WaitOnAddress API is available.
 * Using that and atomics to implement semaphores increases performance. SDL
 * will fall back to Kernel Objects on older OS versions or if forced to by
 * this hint.
 *
 * The variable can be set to the following values:
 *
 * - "0": Use Atomics and WaitOnAddress API when available, otherwise fall
 *   back to Kernel Objects. (default)
 * - "1": Force the use of Kernel Objects in all cases.
 *
 * This hint should be set before SDL is initialized.
 *
 * \since This hint is available since SDL 3.2.0.
 */
#define SDL_HINT_WINDOWS_FORCE_SEMAPHORE_KERNEL "SDL_WINDOWS_FORCE_SEMAPHORE_KERNEL"

/**
 * A variable to specify custom icon resource id from RC file on Windows
 * platform.

Review comment (suggestion):
Can you invert this hint and its default to be simpler?
```suggestion
#define SDL_HINT_WINDOWS_RAW_KEYBOARD_HOTKEYS "SDL_WINDOWS_RAW_KEYBOARD_HOTKEYS"
```

Code after:
 * A variable controlling whether raw keyboard events are used on Windows.
 *
 * The variable can be set to the following values:
 *
 * - "0": The Windows message loop is used for keyboard events. (default)
 * - "1": Low latency raw keyboard events are used.
 *
 * This hint can be set anytime.
 *
 * \since This hint is available since SDL 3.2.0.
 */
#define SDL_HINT_WINDOWS_RAW_KEYBOARD "SDL_WINDOWS_RAW_KEYBOARD"

/**
 * A variable controlling whether or not the RIDEV_NOHOTKEYS flag is set when 
 * enabling Windows raw keyboard events. 
 *
 * This blocks any hotkeys that have been registered by applications from 
 * having any effect beyond generating raw WM_INPUT events. 
 *
 * This flag does not affect system-hotkeys like ALT-TAB or CTRL-ALT-DEL,
 * but does affect the Windows Logo key since it is a userland hotkey registered
 * by explorer.exe.
 *
 * The variable can be set to the following values:
 *
 * - "0": Hotkeys are not excluded. (default)
 * - "1": Hotkeys are excluded.
 *
 * This hint can be set anytime.
 *
 * \since This hint is available since SDL 3.4.0.
 */
#define SDL_HINT_WINDOWS_RAW_KEYBOARD_EXCLUDE_HOTKEYS "SDL_WINDOWS_RAW_KEYBOARD_EXCLUDE_HOTKEYS"

/**
 * A variable controlling whether SDL uses Kernel Semaphores on Windows.
 *
 * Kernel Semaphores are inter-process and require a context switch on every
 * interaction. On Windows 8 and newer, the WaitOnAddress API is available.
 * Using that and atomics to implement semaphores increases performance. SDL
 * will fall back to Kernel Objects on older OS versions or if forced to by
 * this hint.
 *
 * The variable can be set to the following values:
 *
 * - "0": Use Atomics and WaitOnAddress API when available, otherwise fall
 *   back to Kernel Objects. (default)
 * - "1": Force the use of Kernel Objects in all cases.
 *
 * This hint should be set before SDL is initialized.