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