aboutsummaryrefslogtreecommitdiff
path: root/games/xu4/profile_path.diff
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2023-01-13 05:04:12 -0500
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2023-01-14 08:50:32 +0700
commit89948092b63ee2cde71047de886de7565c9524f1 (patch)
tree6fe00dfec795016bcc9bbc8abf962253f8a41cf8 /games/xu4/profile_path.diff
parente02ac6c1e75a7f39f923233689ba4b391e757355 (diff)
games/xu4: Updated for version 1.2.1.
Signed-off-by: B. Watson <urchlay@slackware.uk> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'games/xu4/profile_path.diff')
-rw-r--r--games/xu4/profile_path.diff47
1 files changed, 26 insertions, 21 deletions
diff --git a/games/xu4/profile_path.diff b/games/xu4/profile_path.diff
index b436ac55d98f1..0c5f2060628ac 100644
--- a/games/xu4/profile_path.diff
+++ b/games/xu4/profile_path.diff
@@ -1,29 +1,34 @@
-diff -Naur xu4-20111026_svn/src/settings.cpp xu4-20111026_svn.patched//src/settings.cpp
---- xu4-20111026_svn/src/settings.cpp 2011-06-23 13:36:06.000000000 -0400
-+++ xu4-20111026_svn.patched//src/settings.cpp 2011-10-27 17:27:02.000000000 -0400
-@@ -81,12 +81,6 @@
+diff -Naur xu4-1.2.1/src/settings.cpp xu4-1.2.1.patched/src/settings.cpp
+--- xu4-1.2.1/src/settings.cpp 2022-12-06 13:21:00.000000000 -0500
++++ xu4-1.2.1.patched/src/settings.cpp 2023-01-13 03:37:36.452626171 -0500
+@@ -55,15 +55,6 @@
* Initialize the settings.
*/
- void Settings::init(const bool useProfile, const string profileName) {
-- if (useProfile) {
-- userPath = "./profiles/";
-- userPath += profileName.c_str();
-- userPath += "/";
-- } else {
+ void Settings::init(const char* profileName) {
+- if (profileName && profileName[0]) {
+- userPath = "./profiles/";
+- userPath += profileName;
+- userPath += "/";
-
- #if defined(MACOSX)
- FSRef folder;
- OSErr err = FSFindFolder(kUserDomain, kApplicationSupportFolderType, kCreateFolder, &folder);
-@@ -150,7 +144,12 @@
+- profile = profileName;
+- if (profile.length() > 20)
+- errorFatal("Profile name must be no more than 20 characters.");
+- } else {
+ profile.clear();
+
+ #if defined(ANDROID)
+@@ -123,6 +114,14 @@
userPath = "./";
#endif
-+ if (useProfile) {
-+ userPath += "profiles/";
-+ userPath += profileName.c_str();
-+ userPath += "/";
- }
++ if (profileName && profileName[0]) {
++ userPath += "profiles/";
++ userPath += profileName;
++ userPath += "/";
+
- FileSystem::createDirectory(userPath);
++ profile = profileName;
++ if (profile.length() > 20)
++ errorFatal("Profile name must be no more than 20 characters.");
+ }
- filename = userPath + SETTINGS_BASE_FILENAME;
+ #ifndef ANDROID