From e8304720104614ba6e5462b427bd538b98965422 Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Thu, 2 Oct 2025 03:16:07 +0800 Subject: [PATCH] engine: move update page checks from platform-specific ShellExecute implementation to gameui call (platform_update_page isn't fully used yet, might get on Android some time later) --- engine/client/cl_gameui.c | 3 +++ engine/platform/posix/sys_posix.c | 3 --- engine/platform/win32/sys_win.c | 3 --- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/engine/client/cl_gameui.c b/engine/client/cl_gameui.c index 3da932c2..f7159a66 100644 --- a/engine/client/cl_gameui.c +++ b/engine/client/cl_gameui.c @@ -1096,6 +1096,9 @@ UI_ShellExecute */ static void GAME_EXPORT UI_ShellExecute( const char *path, const char *parms, int shouldExit ) { + if( !Q_strcmp( path, GENERIC_UPDATE_PAGE ) || !Q_strcmp( path, PLATFORM_UPDATE_PAGE )) + path = DEFAULT_UPDATE_PAGE; + Platform_ShellExecute( path, parms ); if( shouldExit ) diff --git a/engine/platform/posix/sys_posix.c b/engine/platform/posix/sys_posix.c index bbbefe15..ad66da9f 100644 --- a/engine/platform/posix/sys_posix.c +++ b/engine/platform/posix/sys_posix.c @@ -28,9 +28,6 @@ void Platform_ShellExecute( const char *path, const char *parms ) const char *argv[] = { OPEN_COMMAND, path, NULL }; pid_t id; - if( !Q_strcmp( path, GENERIC_UPDATE_PAGE ) || !Q_strcmp( path, PLATFORM_UPDATE_PAGE )) - path = DEFAULT_UPDATE_PAGE; - id = fork(); if( id == 0 ) diff --git a/engine/platform/win32/sys_win.c b/engine/platform/win32/sys_win.c index 5eeaaa0a..6d0deada 100644 --- a/engine/platform/win32/sys_win.c +++ b/engine/platform/win32/sys_win.c @@ -111,9 +111,6 @@ qboolean Platform_DebuggerPresent( void ) void Platform_ShellExecute( const char *path, const char *parms ) { - if( !Q_strcmp( path, GENERIC_UPDATE_PAGE ) || !Q_strcmp( path, PLATFORM_UPDATE_PAGE )) - path = DEFAULT_UPDATE_PAGE; - ShellExecuteA( NULL, "open", path, parms, NULL, SW_SHOW ); }