summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorStephen Enders <84310577289916ceefd4132143fb36b63a5f0c71>2022-06-24 21:35:03 -0400
committerSteph Enders <smenders@gmail.com>2022-06-24 17:37:11 -0400
commitde7cc1f12273ae80f4d972b0dbfc48066f851684 (patch)
tree5007501ef4a00828b2febe4d48656da6eaace228 /src/main.cpp
parentab37629c6e4798654fca1d533a611da7986b5053 (diff)
Fix compilation for Windows
I left a few changes undone in the Windows API. This should be cross platform now
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 7de3c11..4ebb8e6 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -52,20 +52,21 @@ int main(int argc, char **argv) {
#ifdef __linux__
Resources *res = new LinuxResources();
- res->loadDefaultLuaFile();
- res->loadFontFiles();
- res->loadLevels();
#endif // __linux__
#ifdef _WIN32
Resources *res = new WindowsResources();
#endif
+ res->loadDefaultLuaFile();
+ res->loadFontFiles();
+ res->loadLevels();
int levelIndex = 0;
std::cout << "Select level from list: " << std::endl;
int i = 0;
for (auto &p : res->getLevels()) {
- std::cout << "\t[" << i++ << "] " << p.parent_path().filename().c_str()
- << "/" << p.filename().c_str() << std::endl;
+ std::cout << "\t[" << i++ << "] "
+ << p.parent_path().filename().generic_string() << "/"
+ << p.filename().generic_string() << std::endl;
}
std::cout << "Enter Number: ";
std::cin >> levelIndex;