Got it working on Windows using Mingw
This commit is contained in:
@ -1,6 +1,8 @@
|
||||
#pragma once
|
||||
#include <functional>
|
||||
#if defined(GEKKO)
|
||||
#if defined(_WIN32)
|
||||
#include <windows.h>
|
||||
#elif defined(GEKKO)
|
||||
#include <ogc/lwp.h>
|
||||
#else
|
||||
#include <threads.h>
|
||||
@ -10,8 +12,13 @@ namespace Tesses::Framework::Threading
|
||||
{
|
||||
class Thread
|
||||
{
|
||||
std::atomic<bool> hasInvoked;
|
||||
#if defined(GEKKO)
|
||||
#if defined(_WIN32)
|
||||
|
||||
HANDLE thrd;
|
||||
DWORD thrdId;
|
||||
|
||||
public:
|
||||
#elif defined(GEKKO)
|
||||
lwp_t thrd;
|
||||
static void* cb(void* ptr);
|
||||
#else
|
||||
@ -19,6 +26,8 @@ namespace Tesses::Framework::Threading
|
||||
static int cb(void* ptr);
|
||||
#endif
|
||||
std::function<void()> fn;
|
||||
|
||||
std::atomic<bool> hasInvoked;
|
||||
public:
|
||||
Thread(std::function<void()> fn);
|
||||
void Join();
|
||||
|
||||
Reference in New Issue
Block a user