Skip to content

Commit c681ff0

Browse files
committed
webOS: ensure HOME directory is always set
1 parent 8788a4a commit c681ff0

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

retroarch.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5988,6 +5988,14 @@ int rarch_main(int argc, char *argv[], void *data)
59885988
#endif
59895989

59905990
#if defined(WEBOS)
5991+
/* compatibility with webOS 1 */
5992+
const char *home = getenv("HOME");
5993+
if (home == NULL || strcmp(home, "/media/developer/") == 0)
5994+
{
5995+
char cwd[PATH_MAX];
5996+
if (getcwd(cwd, sizeof(cwd)) != NULL)
5997+
setenv("HOME", cwd, 1);
5998+
}
59915999
/* compatibility with webOS 3 - 5 */
59926000
if (getenv("EGL_PLATFORM") == NULL)
59936001
setenv("EGL_PLATFORM", "wayland", 0);

0 commit comments

Comments
 (0)