From 12d655114089868b305a112845ec0170ce664745 Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Sat, 9 Apr 2022 11:53:33 +0200 Subject: [PATCH] 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.) --- src/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.34.1