From 7533dcd00b243a114da14b10e9b7e41c5d37aa4d Mon Sep 17 00:00:00 2001 From: Tom Kidd Date: Sat, 2 Oct 2021 21:21:10 -0500 Subject: [PATCH] Addressed string concatenation issue and added dummy method for Mac/Linux --- code/sys/sys_unix.c | 12 ++++++++++++ code/sys/sys_win32.c | 5 ++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/code/sys/sys_unix.c b/code/sys/sys_unix.c index 1043b9a4..8c6ce3c9 100644 --- a/code/sys/sys_unix.c +++ b/code/sys/sys_unix.c @@ -120,6 +120,18 @@ char *Sys_GogPath( void ) return gogPath; } +/* +================ +Sys_MicrosoftStorePath +================ +*/ +char* Sys_MicrosoftStorePath(void) +{ + // Microsoft Store doesn't exist on Mac/Linux + return microsoftStorePath; +} + + /* ================ Sys_Milliseconds diff --git a/code/sys/sys_win32.c b/code/sys/sys_win32.c index f818bb04..bb0e49fa 100644 --- a/code/sys/sys_win32.c +++ b/code/sys/sys_win32.c @@ -232,7 +232,10 @@ Sys_MicrosoftStorePath */ char* Sys_MicrosoftStorePath(void) { - Q_strcat(microsoftStorePath, MAX_OSPATH, "C:\\Program Files\\ModifiableWindowsApps\\Quake 3\\EN"); + if (!microsoftStorePath[0]) + { + Q_strcat(microsoftStorePath, MAX_OSPATH, "C:\\Program Files\\ModifiableWindowsApps\\Quake 3\\EN"); + } return microsoftStorePath; }