From 188768cb2c489620aacd7b64c55778b5b1987dbe Mon Sep 17 00:00:00 2001 From: catriverr Date: Sat, 9 Nov 2024 20:47:44 +0300 Subject: [PATCH] reverted changes --- lib/bin/gmeng.h | 6 ++---- lib/bin/utils/interface.cpp | 2 ++ tests/event_loop.cpp | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/bin/gmeng.h b/lib/bin/gmeng.h index 9e379e6..75f228d 100755 --- a/lib/bin/gmeng.h +++ b/lib/bin/gmeng.h @@ -30,8 +30,6 @@ #include #endif -#define sleep std::this_thread::sleep_for -#define ms std::chrono::milliseconds #define time_rn std::chrono::system_clock::now().time_since_epoch() @@ -927,15 +925,15 @@ static void patch_argv_global(int argc, char* argv[]) { #if _WIN32 == false #include "utils/network.cpp" #ifndef GMENG_NO_CURSES + /// for github build workflow #include "types/interface.h" #include "utils/interface.cpp" - /// for github build workflow +#endif #if GMENG_SDL #include "types/window.h" #include "utils/window.cpp" #endif #endif -#endif #include "utils/util.cpp" namespace g = Gmeng; namespace gm = Gmeng; diff --git a/lib/bin/utils/interface.cpp b/lib/bin/utils/interface.cpp index 9fa7d05..7cec193 100755 --- a/lib/bin/utils/interface.cpp +++ b/lib/bin/utils/interface.cpp @@ -26,6 +26,8 @@ #include #include + #define sleep std::this_thread::sleep_for + #define ms std::chrono::milliseconds #ifndef BUTTON5_PRESSED #define BUTTON5_PRESSED true diff --git a/tests/event_loop.cpp b/tests/event_loop.cpp index 4e92ffa..72f2a1d 100644 --- a/tests/event_loop.cpp +++ b/tests/event_loop.cpp @@ -177,7 +177,7 @@ int main(int argc, char** argv) { prev_color = color; renderscale = get_renderscale(*level); ev.call_event(FIXED_UPDATE, Gmeng::NO_EVENT_INFO); - sleep(ms( std::max(cfg.model_positions["CAKE_INTERACT_TIMES"].x, cfg.model_positions["CAKE_INTERACT_TIMES"].y - (int)(GET_TIME()-tim)) )); + std::this_thread::sleep_for(std::chrono::milliseconds( std::max(cfg.model_positions["CAKE_INTERACT_TIMES"].x, cfg.model_positions["CAKE_INTERACT_TIMES"].y - (int)(GET_TIME()-tim)) )); }; texture_replace_color(level->base.lvl_template, prev_color, BLUE); };