diff --git a/src/linux_platform.cpp b/src/linux_platform.cpp index 1b53a6a..63b1849 100644 --- a/src/linux_platform.cpp +++ b/src/linux_platform.cpp @@ -380,5 +380,7 @@ void platform_update_audio(float dt) soundState->playingSounds.clear(); } - - +void platform_sleep(unsigned int ms) +{ + sleep(ms); +} \ No newline at end of file diff --git a/src/main.cpp b/src/main.cpp index 8538d60..76ebe42 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -162,7 +162,7 @@ void reload_game_dll() while(!copy_file(gameDLLName, gameLoadDLLName, &transientStorage)) { - Sleep(10); + platform_sleep(10); } SM_TRACE("Copied %s", gameDLLName); diff --git a/src/platform.h b/src/platform.h index 3919138..8ece4d8 100644 --- a/src/platform.h +++ b/src/platform.h @@ -30,4 +30,5 @@ void* platform_load_dynamic_library(char* dll); void* platform_load_dynamic_function(void* dll, char* funName); bool platform_free_dynamic_library(void* dll); bool platform_init_audio(); -void platform_update_audio(float dt); \ No newline at end of file +void platform_update_audio(float dt); +void platform_sleep(unsigned int ms); \ No newline at end of file diff --git a/src/win32_platform.cpp b/src/win32_platform.cpp index c1a13d4..d2d86d6 100644 --- a/src/win32_platform.cpp +++ b/src/win32_platform.cpp @@ -660,4 +660,9 @@ void platform_update_audio(float dt) } soundState->playingSounds.count = 0; +} + +void platform_sleep(unsigned int ms) +{ + Sleep(ms); } \ No newline at end of file