From 66d0cef0deee8a5cf1b09cb8a75de8af05be32bf Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Tue, 3 Jun 2014 01:48:10 -0700 Subject: [PATCH] Avoid calling select() with an error pointlessly. It's just a spin loop unfortunately anyway. --- Core/HLE/sceDisplay.cpp | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/Core/HLE/sceDisplay.cpp b/Core/HLE/sceDisplay.cpp index 2921f71449..0550951bbc 100644 --- a/Core/HLE/sceDisplay.cpp +++ b/Core/HLE/sceDisplay.cpp @@ -24,16 +24,6 @@ #ifndef _WIN32 #include #include -#else -#define NOMINMAX -#include - -static inline int usleep(long us) { - struct timeval tv; - tv.tv_sec = 0; - tv.tv_usec = us; - return select(0, NULL, NULL, NULL, &tv); -} #endif // TODO: Move the relevant parts into common. Don't want the core @@ -706,7 +696,9 @@ void hleLagSync(u64 userdata, int cyclesLate) { time_update(); while (time_now_d() < goal) { const double left = goal - time_now_d(); +#ifndef _WIN32 usleep((long)(left * 1000000)); +#endif time_update(); }