[DEV] remove dependency of unistd.h
This commit is contained in:
parent
0d16542a68
commit
4606ec35fd
@ -5,7 +5,7 @@
|
||||
*/
|
||||
#include <gale/Thread.hpp>
|
||||
#include <gale/debug.hpp>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <gale/context/Context.hpp>
|
||||
|
||||
#if defined(__TARGET_OS__Android)
|
||||
@ -97,7 +97,7 @@ void gale::Thread::threadCall() {
|
||||
while (m_state != state::stopping) {
|
||||
if (m_state == state::starting) {
|
||||
GALE_DEBUG("run std::thread [NOTHING to do]");
|
||||
usleep(1000);
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(1));
|
||||
continue;
|
||||
}
|
||||
if (onThreadCall() == true) {
|
||||
|
@ -4,7 +4,7 @@
|
||||
* @license APACHE v2.0 (see license file)
|
||||
*/
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
|
||||
#include <etk/types.hpp>
|
||||
#include <etk/etk.hpp>
|
||||
@ -532,7 +532,7 @@ bool gale::Context::OS_Draw(bool _displayEveryTime) {
|
||||
// this is to prevent the multiple display at the a high frequency ...
|
||||
#if (!defined(__TARGET_OS__Android) && !defined(__TARGET_OS__Windows))
|
||||
if(currentTime - m_previousDisplayTime < 1000000/120) {
|
||||
usleep(1000);
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(1));
|
||||
gale::openGL::threadHasNoMoreContext();
|
||||
return false;
|
||||
}
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
#include <gale/context/IOs/Interface.h>
|
||||
#include <gale/context/IOs/Context.hpp>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <cstdlib>
|
||||
#include <cstdio>
|
||||
#include <cstring>
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
#include <gale/context/MacOs/Interface.hpp>
|
||||
#include <gale/context/MacOs/Context.hpp>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
@ -4,7 +4,7 @@
|
||||
* @license APACHE v2.0 (see license file)
|
||||
*/
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
#include <cstdlib>
|
||||
#include <cstdio>
|
||||
#include <cstring>
|
||||
|
@ -36,7 +36,7 @@
|
||||
#include <gale/renderer/eSystem.hpp>
|
||||
#include <gale/openGL/openGL.hpp>
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
#include <cstdlib>
|
||||
#include <cstdio>
|
||||
#include <cstring>
|
||||
|
Loading…
x
Reference in New Issue
Block a user