diff --git a/src/Backends/Platform/GLFW3.cpp b/src/Backends/Platform/GLFW3.cpp index df7b234b..93135607 100644 --- a/src/Backends/Platform/GLFW3.cpp +++ b/src/Backends/Platform/GLFW3.cpp @@ -1,13 +1,20 @@ #include "../Misc.h" -#include #include #include #include #include #include #include -#include + +#if __cplusplus >= 201103L + #include + #include +#elif defined(_WIN32) + #include "windows.h" +#else + #include +#endif #include @@ -319,6 +326,12 @@ unsigned long Backend_GetTicks(void) void Backend_Delay(unsigned int ticks) { +#if __cplusplus >= 201103L // GLFW3 doesn't have a delay function, so here's some butt-ugly C++11 std::this_thread::sleep_for(std::chrono::milliseconds(ticks)); +#elif defined(_WIN32) + Sleep(ticks); +#else + usleep(ticks * 1000); +#endif }