Skip to content

Commit

Permalink
Fix basePath -> base_path
Browse files Browse the repository at this point in the history
  • Loading branch information
Daft-Freak committed Jan 25, 2022
1 parent abb2ed0 commit a1e448f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions 32blit-sdl/File.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,22 @@
#include "File.hpp"
#include "UserCode.hpp"

static std::string basePath, save_path;
static std::string base_path, save_path;

static std::string map_path(const std::string &path) {
// check if the path is under the save path
if(path.compare(0, save_path.length(), save_path) == 0)
return path;

// otherwise it should be under the base path
return basePath + path;
return base_path + path;
}

void setup_base_path() {
auto basePathPtr = SDL_GetBasePath();
if(basePathPtr)
basePath = std::string(basePathPtr);
SDL_free(basePathPtr);
auto base_path_str = SDL_GetBasePath();
if(base_path_str)
base_path = std::string(base_path_str);
SDL_free(base_path_str);

auto tmp = SDL_GetPrefPath(metadata_author, metadata_title);
if(tmp)
Expand Down

0 comments on commit a1e448f

Please sign in to comment.