Add protocol activation URI support for WinRT (#14309)

This commit is contained in:
danprice142
2025-10-24 18:34:44 +01:00
committed by GitHub
parent 66d87bf0e1
commit 3e1cebed3c
2 changed files with 44 additions and 0 deletions

View File

@@ -572,6 +572,22 @@ extern DECLSPEC const char * SDLCALL SDL_WinRTGetFSPathUTF8(SDL_WinRT_Path pathT
*/
extern DECLSPEC SDL_WinRT_DeviceFamily SDLCALL SDL_WinRTGetDeviceFamily();
/**
* Get the protocol activation URI if the app was launched via protocol activation.
*
* When a UWP/WinRT app is launched via a custom URI scheme (e.g., myapp://action?param=value),
* this function retrieves the full activation URI string.
*
* The URI is only available once per activation - after the first successful call,
* subsequent calls will return NULL. This ensures the URI is processed only once.
*
* \returns the protocol activation URI as a UTF-8 string that must be freed with SDL_free(),
* or NULL if the app was not activated via protocol or the URI was already retrieved.
*
* \since This function is available since SDL 2.33.0.
*/
extern DECLSPEC char * SDLCALL SDL_WinRTGetProtocolActivationURI(void);
#endif /* __WINRT__ */
/**