|
@@ -242,13 +242,18 @@ extern SDL_DECLSPEC void SDLCALL SDL_Quit(void);
|
|
|
/**
|
|
|
* Return whether this is the main thread.
|
|
|
*
|
|
|
- * On Apple platforms, the main thread is the thread that runs your program's main() entry point. On other platforms, the main thread is the one that calls SDL_Init(SDL_INIT_VIDEO), which should usually be the one that runs your program's main() entry point. If you are using the main callbacks, SDL_AppInit(), SDL_AppIterate(), and SDL_AppQuit() are all called on the main thread.
|
|
|
+ * On Apple platforms, the main thread is the thread that runs your program's
|
|
|
+ * main() entry point. On other platforms, the main thread is the one that
|
|
|
+ * calls SDL_Init(SDL_INIT_VIDEO), which should usually be the one that runs
|
|
|
+ * your program's main() entry point. If you are using the main callbacks,
|
|
|
+ * SDL_AppInit(), SDL_AppIterate(), and SDL_AppQuit() are all called on the
|
|
|
+ * main thread.
|
|
|
*
|
|
|
* \returns true if this thread is the main thread, or false otherwise.
|
|
|
*
|
|
|
* \threadsafety It is safe to call this function from any thread.
|
|
|
*
|
|
|
- * \since This function is available since SDL 3.1.8.
|
|
|
+ * \since This function is available since SDL 3.2.0.
|
|
|
*
|
|
|
* \sa SDL_RunOnMainThread
|
|
|
*/
|
|
@@ -268,19 +273,24 @@ typedef void (SDLCALL *SDL_MainThreadCallback)(void *userdata);
|
|
|
/**
|
|
|
* Call a function on the main thread during event processing.
|
|
|
*
|
|
|
- * If this is called on the main thread, the callback is executed immediately. If this is called on another thread, this callback is queued for execution on the main thread during event processing.
|
|
|
+ * If this is called on the main thread, the callback is executed immediately.
|
|
|
+ * If this is called on another thread, this callback is queued for execution
|
|
|
+ * on the main thread during event processing.
|
|
|
*
|
|
|
- * Be careful of deadlocks when using this functionality. You should not have the main thread wait for the current thread while this function is being called with `wait_complete` true.
|
|
|
+ * Be careful of deadlocks when using this functionality. You should not have
|
|
|
+ * the main thread wait for the current thread while this function is being
|
|
|
+ * called with `wait_complete` true.
|
|
|
*
|
|
|
* \param callback the callback to call on the main thread.
|
|
|
* \param userdata a pointer that is passed to `callback`.
|
|
|
- * \param wait_complete true to wait for the callback to complete, false to return immediately.
|
|
|
+ * \param wait_complete true to wait for the callback to complete, false to
|
|
|
+ * return immediately.
|
|
|
* \returns true on success or false on failure; call SDL_GetError() for more
|
|
|
* information.
|
|
|
*
|
|
|
* \threadsafety It is safe to call this function from any thread.
|
|
|
*
|
|
|
- * \since This function is available since SDL 3.1.8.
|
|
|
+ * \since This function is available since SDL 3.2.0.
|
|
|
*
|
|
|
* \sa SDL_IsMainThread
|
|
|
*/
|