Expose SDL_OpenURL to mod code.

This commit is contained in:
Paul Chote
2025-12-05 17:40:40 +00:00
committed by Gustas Kažukauskas
parent de952e6caf
commit c7e67529b5
3 changed files with 18 additions and 0 deletions

View File

@@ -513,6 +513,18 @@ namespace OpenRA.Platforms.Default
return Sdl2Input.SetClipboardText(text);
}
public bool TryOpenUrl(string url)
{
try
{
return SDL.SDL_OpenURL(url) == 0;
}
catch
{
return false;
}
}
static void SetSDLAttributes(GLProfile profile)
{
SDL.SDL_GL_ResetAttributes();