|
2 | 2 | olcPixelGameEngine.h |
3 | 3 |
|
4 | 4 | +-------------------------------------------------------------+ |
5 | | - | OneLoneCoder Pixel Game Engine v1.21 | |
| 5 | + | OneLoneCoder Pixel Game Engine v1.22 | |
6 | 6 | | "Like the command prompt console one, but not..." - javidx9 | |
7 | 7 | +-------------------------------------------------------------+ |
8 | 8 |
|
|
144 | 144 |
|
145 | 145 | Author |
146 | 146 | ~~~~~~ |
147 | | - David Barr, aka javidx9, ©OneLoneCoder 2018, 2019 |
| 147 | + David Barr, aka javidx9, ©OneLoneCoder 2018, 2019 |
148 | 148 | */ |
149 | 149 |
|
150 | 150 | ////////////////////////////////////////////////////////////////////////////////////////// |
|
246 | 246 | #include <functional> |
247 | 247 | #include <algorithm> |
248 | 248 |
|
249 | | -#if __cplusplus >= 201703L |
250 | | - // C++17 onwards |
251 | | - #include <filesystem> |
252 | | - namespace _gfs = std::filesystem; |
253 | | -#else |
254 | | - // Older "Modern" C++ :P |
255 | | - #include <experimental/filesystem> |
256 | | - namespace _gfs = std::experimental::filesystem::v1; |
| 249 | +#if defined(_WIN32) |
| 250 | + #if _MSVC_LANG >= 201703L // Thanks @slavka |
| 251 | + // C++17 onwards |
| 252 | + #include <filesystem> |
| 253 | + namespace _gfs = std::filesystem; |
| 254 | + #else |
| 255 | + // Older "Modern" C++ :P |
| 256 | + #include <experimental/filesystem> |
| 257 | + namespace _gfs = std::experimental::filesystem::v1; |
| 258 | + #endif |
| 259 | +#endif |
| 260 | + |
| 261 | +#if defined(_linux_) || defined(__MINGW32__) |
| 262 | + #if __cplusplus >= 201703L |
| 263 | + // C++17 onwards |
| 264 | + #include <filesystem> |
| 265 | + namespace _gfs = std::filesystem; |
| 266 | + #else |
| 267 | + // Older "Modern" C++ :P |
| 268 | + #include <experimental/filesystem> |
| 269 | + namespace _gfs = std::experimental::filesystem::v1; |
| 270 | + #endif |
257 | 271 | #endif |
258 | 272 |
|
259 | 273 | #undef min |
|
0 commit comments