mirror of
https://github.com/kichikuou/xsystem35-sdl2.git
synced 2026-10-05 13:18:08 +03:00
Windows: Load %USERPROFILE%/.xys35rc if %HOME% is not set
This commit is contained in:
+6
-2
@@ -133,8 +133,12 @@ static int load_rc_file(const char *profile_path)
|
||||
|
||||
int load_profile(void)
|
||||
{
|
||||
char *home_dir;
|
||||
if ((home_dir = getenv("HOME"))) {
|
||||
char *home_dir = getenv("HOME");
|
||||
#ifdef _WIN32
|
||||
if (!home_dir)
|
||||
home_dir = getenv("USERPROFILE");
|
||||
#endif
|
||||
if (home_dir) {
|
||||
char profile_path[PATH_MAX];
|
||||
sprintf(profile_path, "%s/%s", home_dir, RC_NAME);
|
||||
load_rc_file(profile_path);
|
||||
|
||||
Reference in New Issue
Block a user