@@ -42,7 +42,7 @@ void AddTrailingSlash(std::string &path)
42
42
path += DirectorySeparator;
43
43
}
44
44
45
- std::string FromSDL (char *s)
45
+ [[maybe_unused]] std::string FromSDL (char *s)
46
46
{
47
47
const SDLUniquePtr<char > pinned (s);
48
48
std::string result = (s != nullptr ? s : " " );
@@ -72,21 +72,27 @@ const std::string &NxdkGetPrefPath()
72
72
const std::string &BasePath ()
73
73
{
74
74
if (!basePath) {
75
+ #if defined(__DJGPP__)
76
+ basePath = std::string ();
77
+ #else
75
78
basePath = FromSDL (SDL_GetBasePath ());
79
+ #endif
76
80
}
77
81
return *basePath;
78
82
}
79
83
80
84
const std::string &PrefPath ()
81
85
{
82
86
if (!prefPath) {
83
- #if defined(__IPHONEOS__)
87
+ #if defined(__DJGPP__)
88
+ prefPath = std::string ();
89
+ #elif defined(__IPHONEOS__)
84
90
prefPath = FromSDL (IOSGetPrefPath ());
85
91
#elif defined(NXDK)
86
92
prefPath = NxdkGetPrefPath ();
87
93
#else
88
94
prefPath = FromSDL (SDL_GetPrefPath (" diasurgical" , " devilution" ));
89
- #if !defined(__amigaos__)
95
+ #if !defined(__amigaos__) && !defined(__DJGPP__)
90
96
if (FileExistsAndIsWriteable (" diablo.ini" )) {
91
97
prefPath = std::string ();
92
98
}
@@ -99,13 +105,15 @@ const std::string &PrefPath()
99
105
const std::string &ConfigPath ()
100
106
{
101
107
if (!configPath) {
102
- #if defined(__IPHONEOS__)
108
+ #if defined(__DJGPP__)
109
+ configPath = std::string ();
110
+ #elif defined(__IPHONEOS__)
103
111
configPath = FromSDL (IOSGetPrefPath ());
104
112
#elif defined(NXDK)
105
113
configPath = NxdkGetPrefPath ();
106
114
#else
107
115
configPath = FromSDL (SDL_GetPrefPath (" diasurgical" , " devilution" ));
108
- #if !defined(__amigaos__)
116
+ #if !defined(__amigaos__) && !defined(__DJGPP__)
109
117
if (FileExistsAndIsWriteable (" diablo.ini" )) {
110
118
configPath = std::string ();
111
119
}
@@ -118,8 +126,8 @@ const std::string &ConfigPath()
118
126
const std::string &AssetsPath ()
119
127
{
120
128
if (!assetsPath) {
121
- #if __EMSCRIPTEN__
122
- assetsPath.emplace (" assets/ " );
129
+ #if __EMSCRIPTEN__ || defined(__DJGPP__)
130
+ assetsPath.emplace (" assets" DIRECTORY_SEPARATOR_STR );
123
131
#elif defined(NXDK)
124
132
assetsPath.emplace (" D:\\ assets\\ " );
125
133
#elif defined(__3DS__) || defined(__SWITCH__)
0 commit comments