Skip to content

Commit

Permalink
Fix Windows build
Browse files Browse the repository at this point in the history
  • Loading branch information
pinguin999 committed Sep 2, 2024
1 parent a5a0d57 commit f9c2b1b
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,9 @@ void Game::debugStep()
{
if (i == target) {
#ifdef _WIN32
loadLuaState(std::wstring(entry.path().filename()));
std::wstring wide = std::wstring(entry.path().filename());
std::string str( wide.begin(), wide.end() );
loadLuaState(str);
#else
loadLuaState(std::string(entry.path().filename()));
#endif
Expand Down Expand Up @@ -470,9 +472,11 @@ void Game::debugStep()
for (const auto & entry : std::filesystem::directory_iterator(path))
{
#ifdef _WIN32
files += std::to_string(i) + " " + (std::wstring(entry.path().filename()) + "\n");
#esle
files += std::to_string(i) + " " + (std::string(entry.path().filename()) + "\n");
std::wstring wide = std::wstring(entry.path().filename());
std::string str( wide.begin(), wide.end() );
files += std::to_string(i) + " " + str + "\n";
#else
files += std::to_string(i) + " " + std::string(entry.path().filename()) + "\n";
#endif
i++;
}
Expand Down

0 comments on commit f9c2b1b

Please sign in to comment.