From d43c22b8dc66cf85bc42044cca3e63fe8f05c8d5 Mon Sep 17 00:00:00 2001 From: nakeee Date: Mon, 23 Feb 2009 09:54:12 +0000 Subject: [PATCH] Linux compile fix, added SLEEP to common, please use this macro if really don't want to use the sleep in thread git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2390 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/Common/Src/Common.h | 7 +++++++ Source/Core/DolphinWX/Src/FrameTools.cpp | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Source/Core/Common/Src/Common.h b/Source/Core/Common/Src/Common.h index c46e6219e3..764b7a4589 100644 --- a/Source/Core/Common/Src/Common.h +++ b/Source/Core/Common/Src/Common.h @@ -161,6 +161,7 @@ inline u32 _rotr(u32 x, int shift) { #define LONG int + #ifndef __forceinline #define __forceinline inline #endif @@ -384,6 +385,12 @@ namespace /////////////////////////////////////// +#ifdef _WIN32 +#define SLEEP(x) Sleep(x) +#else +#define SLEEP(x) usleep(x*1000) +#endif + #endif // _COMMON_H diff --git a/Source/Core/DolphinWX/Src/FrameTools.cpp b/Source/Core/DolphinWX/Src/FrameTools.cpp index 3486754552..5b74242f6b 100644 --- a/Source/Core/DolphinWX/Src/FrameTools.cpp +++ b/Source/Core/DolphinWX/Src/FrameTools.cpp @@ -531,7 +531,7 @@ void CFrame::DoStop() */ #ifndef SETUP_TIMER_WAITING if (bRenderToMain) - while(Core::GetState() != Core::CORE_UNINITIALIZED) Sleep(10); + while(Core::GetState() != Core::CORE_UNINITIALIZED) SLEEP(10); #endif UpdateGUI();