diff --git a/src/i_system.h b/src/i_system.h index 8a875728f..9f7b0ae2e 100644 --- a/src/i_system.h +++ b/src/i_system.h @@ -212,6 +212,10 @@ static inline void I_HandleInterrupt(void) I_Quit(); } +/** \brief Open A URL + */ +int I_OpenURL(const char *url); + /** \brief The I_GetDiskFreeSpace function \param freespace a INT64 pointer to hold the free space amount diff --git a/src/m_menu.c b/src/m_menu.c index bc7c47c42..ae5bfed18 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -25,6 +25,7 @@ #include "d_netcmd.h" #include "d_clisrv.h" #include "i_net.h" +#include "i_system.h" #include "console.h" #include "r_fps.h" #include "r_local.h" @@ -276,6 +277,8 @@ static void M_ConfirmTeamChange(INT32 choice); static void M_ConfirmSpectateChange(INT32 choice); static void M_QuitSRB2(INT32 choice); +static void M_SaturnReportIssue(INT32 choice); + // Single Player static void M_TimeAttack(INT32 choice); static boolean M_QuitTimeAttackMenu(void); @@ -10589,6 +10592,20 @@ static void M_QuitSRB2(INT32 choice) M_StartMessage(quitmsg[M_RandomKey(NUM_QUITMESSAGES)], M_QuitResponse, MM_YESNO); } +// =========== +// SATURN MENU +// =========== + +static void M_SaturnReportIssue(INT32 choice) +{ + (void)choice; + int url = I_OpenURL(SATURNISSUEPAGE); + + // SDL_OpenURL unsupported or failed + if (url == -1) + M_StartMessage(M_GetText("Failed to Open Web Page.\nPlease open the following page in your web browser:\n\n" SATURNISSUEPAGE "\n\n(Press a key)\n"), NULL, MM_NOTHING); +} + #ifdef HAVE_DISCORDRPC // ===================================================================== diff --git a/src/m_menudefs.c b/src/m_menudefs.c index 23557b8c4..4a00f3020 100644 --- a/src/m_menudefs.c +++ b/src/m_menudefs.c @@ -1784,6 +1784,7 @@ static menuitem_t OP_SaturnMenu[] = {IT_SUBMENU|IT_STRING, NULL, "Saturn Hud...", &OP_SaturnHudDef, 140}, {IT_SUBMENU|IT_STRING, NULL, "Sprite Distortion...", &OP_PlayerDistortDef, 145}, {IT_SUBMENU|IT_STRING, NULL, "Saturn Credits", &OP_SaturnCreditsDef, 150}, // uwu + {IT_STRING|IT_CALL, NULL, "Report an Issue", M_SaturnReportIssue, 155} }; static const char* OP_SaturnTooltips[] = @@ -1807,6 +1808,7 @@ static const char* OP_SaturnTooltips[] = "Options for Saturn specific HUD things.", "Options for sprite distortion effects.", "See the people who helped make this project possible!", + "Noticed a bug, have a Suggestion or other Feedback?\nFeel free to tell us!", }; enum @@ -1828,6 +1830,7 @@ enum sm_hud, sm_distortionmenu, sm_credits, + sm_issue, }; static menuitem_t OP_PlayerDistortMenu[] = diff --git a/src/sdl/i_system.cpp b/src/sdl/i_system.cpp index 76df07cf3..9cbdc879c 100644 --- a/src/sdl/i_system.cpp +++ b/src/sdl/i_system.cpp @@ -1700,7 +1700,7 @@ static void I_PrintSignal(INT32 signal_num, boolean core_dumped, char *signal_ms sprintf(signal_name, "%s", signame); } -static int I_OpenURL(const char *url) +int I_OpenURL(const char *url) { #if SDL_VERSION_ATLEAST(2,0,14) return SDL_OpenURL(va("%s", url));