have fallback if SDL_OpenURL fails or does not exist on the Error box

This commit is contained in:
alufolie91 committed 2026-07-08 20:33:20 +02:00
1 parent c374bd75fc
commit 2b0e4b7468
2 files changed
+10 -1

No files matched your search

+3
View File
@@ -14,6 +14,9 @@
#ifndef __I_SYSTEM__
#define __I_SYSTEM__
// page for Saturn issue reports
#define SATURNISSUEPAGE "https://github.com/Indev450/SRB2Kart-Saturn/issues"
#ifdef __cplusplus
extern "C" {
#endif
+7 -1
View File
@@ -1711,6 +1711,8 @@ static int I_OpenURL(const char *url)
static void I_ShowErrorBox(const char *title, const char *msg)
{
int url = -1;
if (M_CheckParm("-dedicated"))
return;
@@ -1736,7 +1738,11 @@ static void I_ShowErrorBox(const char *title, const char *msg)
SDL_ShowMessageBox(&messageboxdata, &buttonid);
if (buttonid == 1)
I_OpenURL("https://github.com/Indev450/SRB2Kart-Saturn/issues");
url = I_OpenURL(SATURNISSUEPAGE);
// SDL_OpenURL unsupported or failed
if (url == -1)
SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Failed to Open Web Page", "Please open the following page in your web browser:\n" SATURNISSUEPAGE, NULL);
}
static void I_ShowSimpleErrorBox(const char *title, char *msg)