From 0f4f0043e9a71e51ac061fd042d0da3d673d3e34 Mon Sep 17 00:00:00 2001 From: ErikWB Date: Mon, 25 Jan 2016 10:20:01 +0100 Subject: [PATCH] Now jpg_proxy_test/JPCJob.cpp compiles on windows. If WIN32 will use Sleep() from windows.h, otherwise usleep is used. --- examples/jpg_proxy_test/JPCJob.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/examples/jpg_proxy_test/JPCJob.cpp b/examples/jpg_proxy_test/JPCJob.cpp index 61c6d79..382d57b 100644 --- a/examples/jpg_proxy_test/JPCJob.cpp +++ b/examples/jpg_proxy_test/JPCJob.cpp @@ -40,7 +40,10 @@ #include "tinia/model/File.hpp" #include "tinia/utils/ProxyDebugGUI.hpp" - +#ifdef WIN32 +#define NOMINMAX +#include +#endif namespace tinia { namespace example { @@ -143,7 +146,11 @@ bool JPCJob::renderFrame(const std::string &session, const std::string &key, uns m_model->getElementValue("simulatedAdditionalLatency", ms); if (ms>0) { std::cout << "Sleeping for " << ms << " ms." << std::endl; +#ifndef WIN32 usleep( 1000 * ms ); +#else + Sleep( 1000 * ms ); +#endif } }