From: Holger Schemel Date: Sat, 9 Apr 2022 09:53:33 +0000 (+0200) Subject: fixed using individual program data path for Emscripten platform X-Git-Tag: 4.3.2.0~29 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=12d655114089868b305a112845ec0170ce664745;p=rocksndiamonds.git fixed using individual program data path for Emscripten platform Before, the Emscripten platform was treated as "Unix platform", which should use ".rocksndiamonds" (or ".") as the data path. As there is no "program name" on Emscripten platform, it is set to "this" by the Emscripten environment, resulting in using ".this" for all R'n'D based programs under the same domain in the IndexedDB store of the browser, so there is no separation of individual program data for different R'n'D based custom games, leading to shared data like player name, setup settings and everything else, which is not desired. This commit fixed this problem by using the program title instead of the program's executable name (just like it is already done for the Windows and Mac platforms.) --- diff --git a/src/main.c b/src/main.c index 7ebbee1f..3ef3df98 100644 --- a/src/main.c +++ b/src/main.c @@ -7839,7 +7839,7 @@ static void InitProgramConfig(char *command_filename) strlen(setup.internal.program_icon_file) > 0) program_icon_file = getStringCopy(setup.internal.program_icon_file); -#if defined(PLATFORM_WIN32) || defined(PLATFORM_MACOSX) +#if defined(PLATFORM_WIN32) || defined(PLATFORM_MACOSX) || defined(PLATFORM_EMSCRIPTEN) userdata_subdir = program_title; #elif defined(PLATFORM_UNIX) userdata_subdir = userdata_subdir_unix;