Add a bunch of #ifdefs to keep things working as expected on linux

This commit is contained in:
Tyler Wilding
2020-09-03 22:24:50 -04:00
parent f68f220e5b
commit ef09eb12c8
26 changed files with 336 additions and 419 deletions
+15 -2
View File
@@ -4,7 +4,6 @@
* DONE!
*/
#include <io.h>
#include <cstring>
#include "common/common_types.h"
#include "game/sce/libscf.h"
@@ -13,7 +12,14 @@
#include "kscheme.h"
#include "ksocket.h"
#include "klisten.h"
#ifdef _WIN32
#include "Windows.h"
#include <io.h>
#elif __linux__
#include <unistd.h>
#endif
using namespace ee;
// Level to load on boot
@@ -128,14 +134,21 @@ void KernelCheckAndDispatch() {
// dispatch the kernel
//(**kernel_dispatcher)();
call_goal(Ptr<Function>(kernel_dispatcher->value), 0, 0, 0, s7.offset, g_ee_main_mem);
//ClearPending();
// TODO-WINDOWS
#ifdef __linux__
ClearPending();
#endif
// if the listener function changed, it means the kernel ran it, so we should notify compiler.
if (MasterDebug && ListenerFunction->value != old_listener) {
SendAck();
}
#ifdef _WIN32
Sleep(1000); // todo - remove this
#elif __linux__
usleep(1000);
#endif
}
}