浏览代码

docs: Note SDL_EVENT_AUDIO_DEVICE_ADDED is sent for all devices at startup.

Fixes https://github.com/libsdl-org/sdlwiki/issues/721
Ryan C. Gordon 1 月之前
父节点
当前提交
acbe86399d
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      include/SDL3/SDL_events.h

+ 4 - 0
include/SDL3/SDL_events.h

@@ -705,6 +705,10 @@ typedef struct SDL_GamepadSensorEvent
 /**
 /**
  * Audio device event structure (event.adevice.*)
  * Audio device event structure (event.adevice.*)
  *
  *
+ * Note that SDL will send a SDL_EVENT_AUDIO_DEVICE_ADDED event for every
+ * device it discovers during initialization. After that, this event will only
+ * arrive when a device is hotplugged during the program's run.
+ *
  * \since This struct is available since SDL 3.2.0.
  * \since This struct is available since SDL 3.2.0.
  */
  */
 typedef struct SDL_AudioDeviceEvent
 typedef struct SDL_AudioDeviceEvent