MCPcopy Create free account
hub / github.com/diasurgical/devilution / GetBasePath

Function GetBasePath

SourceX/storm/storm.cpp:42–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40static Mix_Chunk *SFileChunk;
41
42void GetBasePath(char *buffer, size_t size)
43{
44 if (basePath.length()) {
45 snprintf(buffer, size, "%s", basePath.c_str());
46 return;
47 }
48
49 char *path = SDL_GetBasePath();
50 if (path == NULL) {
51 SDL_Log(SDL_GetError());
52 buffer[0] = '\0';
53 return;
54 }
55
56 snprintf(buffer, size, "%s", path);
57 SDL_free(path);
58}
59
60void GetPrefPath(char *buffer, size_t size)
61{

Callers 1

init.cppFile · 0.85

Calls 2

SDL_GetBasePathFunction · 0.85
SDL_LogFunction · 0.85

Tested by

no test coverage detected