aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander M Pickering <alex@cogarr.net>2023-04-14 20:53:46 -0500
committerAlexander M Pickering <alex@cogarr.net>2023-04-14 20:53:46 -0500
commit094f1c458f1fe0bb7896a1f1da7f73e9093b3c93 (patch)
tree27c26b966bc5c2a32ddc9693f869af7e94a29be0
parent3d8f66eb76b4c3f4aab43d75dc2fcb582837a985 (diff)
downloadbrokengine-094f1c458f1fe0bb7896a1f1da7f73e9093b3c93.tar.gz
brokengine-094f1c458f1fe0bb7896a1f1da7f73e9093b3c93.tar.bz2
brokengine-094f1c458f1fe0bb7896a1f1da7f73e9093b3c93.zip
Only use c++ threads if they're supported by the compiler
-rw-r--r--src/server/main.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/server/main.cpp b/src/server/main.cpp
index 47a2c94..d27be67 100644
--- a/src/server/main.cpp
+++ b/src/server/main.cpp
@@ -127,7 +127,9 @@ int main (int argc, char *argv[]){
assert(lua_gettop(L) == 0);
//printf("Gameloop\n");
//std::this_thread::yield();
+#ifdef this_thread
std::this_thread::sleep_for(std::chrono::milliseconds(100));
+#endif
//printf("Thread yeild\n");
assert(lua_gettop(L) == 0);
pusherrorfunc(L);//errfunc()