Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
robins-rescue/sludge/source_changes/main.cpp.diff
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
19 lines (18 sloc)
775 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/source/Engine/main.cpp b/source/Engine/main.cpp | |
index 10c8101..d7ec2e4 100644 | |
--- a/source/Engine/main.cpp | |
+++ b/source/Engine/main.cpp | |
@@ -298,7 +298,12 @@ int main(int argc, char *argv[]) try | |
#ifdef __APPLE__ | |
// bundleFolder is set in applicationDidFinishLaunching. | |
#elif defined __unix__ | |
- bundleFolder = copyString(DATADIR); // DATADIR is defined in the Makefile. | |
+ bundleFolder = getenv("SLUDGE_DATADIR"); | |
+ if (bundleFolder == NULL) | |
+ { | |
+ bundleFolder = copyString(DATADIR); // DATADIR is defined in the Makefile. | |
+ fprintf(stderr, "SLUDGE_DATADIR not found, defaulting to %s\n", bundleFolder); | |
+ } | |
#else | |
bundleFolder = copyString(argv[0]); | |
int lastSlash = -1; | |