From a9cbbb1d5c5e878ce292fa2e1d0c338dbe762502 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jaakko=20Kera=CC=88nen?= jaakko.keranen@iki.fi
Date: Sun, 7 Feb 2021 06:54:15 +0200
Subject: [PATCH 1/1] Windows: Check for a portable userdata directory
IssueID #120
src/app.c | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/src/app.c b/src/app.c
index 4eeae94e..a368767a 100644
--- a/src/app.c
+++ b/src/app.c
@@ -219,6 +219,14 @@ static const char *dataDir_App_(void) {
if (configHome) {
return concatPath_CStr(configHome, "lagrange");
}
+#endif
+#if defined (iPlatformMsys)
return userDir;
#endif
return defaultDataDir_App_;
}
@@ -377,10 +385,6 @@ static uint32_t checkAsleep_App_(uint32_t interval, void *param) {
#endif
static void init_App_(iApp *d, int argc, char **argv) {
init_CommandLine(&d->args, argc, argv);
/* Where was the app started from? We ask SDL first because the command line alone is
not a reliable source of this information, particularly when it comes to different
@@ -395,6 +399,10 @@ static void init_App_(iApp *d, int argc, char **argv) {
}
SDL_free(exec);
}
init_SortedArray(&d->tickers, sizeof(iTicker), cmp_Ticker_);
d->lastTickerTime = SDL_GetTicks();
d->elapsedSinceLastTicker = 0;
--
2.25.1
text/plain
This content has been proxied by September (ba2dc).