mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-03-20 15:51:07 +01:00
gdk: Update Suspend/Resume best practices.
Updated testgdk to demonstrate correct handling of suspend/resume and the new Render APIs, and updated the docs to explain the correct usage of these GDK functions.
This commit is contained in:
@@ -3085,12 +3085,14 @@ extern SDL_DECLSPEC void SDLCALL SDL_DestroyGPURenderState(SDL_GPURenderState *s
|
||||
#ifdef SDL_PLATFORM_GDK
|
||||
|
||||
/**
|
||||
* Call this to suspend Render operations on Xbox when you receive the
|
||||
* Call this to suspend Render operations on Xbox after receiving the
|
||||
* SDL_EVENT_DID_ENTER_BACKGROUND event.
|
||||
*
|
||||
* Do NOT call any SDL_Render functions after calling this function! This must
|
||||
* also be called before calling SDL_GDKSuspendComplete.
|
||||
*
|
||||
* This function MUST be called on the application's render thread.
|
||||
*
|
||||
* \param renderer the renderer which should suspend operation
|
||||
*
|
||||
* \since This function is available since SDL 3.6.0.
|
||||
@@ -3100,12 +3102,14 @@ extern SDL_DECLSPEC void SDLCALL SDL_DestroyGPURenderState(SDL_GPURenderState *s
|
||||
extern SDL_DECLSPEC void SDLCALL SDL_GDKSuspendRenderer(SDL_Renderer *renderer);
|
||||
|
||||
/**
|
||||
* Call this to resume Render operations on Xbox when you receive the
|
||||
* Call this to resume Render operations on Xbox after receiving the
|
||||
* SDL_EVENT_WILL_ENTER_FOREGROUND event.
|
||||
*
|
||||
* When resuming, this function MUST be called before calling any other
|
||||
* SDL_Render functions.
|
||||
*
|
||||
* This function MUST be called on the application's render thread.
|
||||
*
|
||||
* \param renderer the renderer which should resume operation
|
||||
*
|
||||
* \since This function is available since SDL 3.6.0.
|
||||
|
||||
Reference in New Issue
Block a user