Skip to content

Commit

Permalink
Fix Logo to use the correct path separator -- #19
Browse files Browse the repository at this point in the history
  • Loading branch information
George-lewis committed Dec 21, 2019
1 parent 59c6e9e commit 3f0b5ef
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
14 changes: 8 additions & 6 deletions src/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,20 @@ namespace DVD {

class Config {

#if defined(WIN32) || defined(_WIN32)
static const char PATHSEP = '\\';
#else
static const char PATHSEP = '/';
#endif

static std::string config_file, arg0;

static std::unordered_map<std::string, std::string> _default, read;

public:

// Windows and Unix use different path separators
// This is to handle that
#if defined(WIN32) || defined(_WIN32)
static const char PATHSEP = '\\';
#else
static const char PATHSEP = '/';
#endif

static bool parseCommandLine(int argc, char** argv);

static void readConfig();
Expand Down
2 changes: 1 addition & 1 deletion src/logo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ void Logo::load_images() {

std::stringstream filename;

filename << "resources/dvdlogo-0" << i << ".png";
filename << "resources" << DVD::Config::PATHSEP << "dvdlogo-0" << i << ".png";

std::cout << "Load file: \"" << Config::getRelative(filename.str()) << '"' << std::endl;

Expand Down

0 comments on commit 3f0b5ef

Please sign in to comment.