Got it working on Windows using Mingw
This commit is contained in:
@ -1,11 +1,15 @@
|
||||
#pragma once
|
||||
#include "VFS.hpp"
|
||||
#include "VFSFix.hpp"
|
||||
|
||||
namespace Tesses::Framework::Filesystem
|
||||
{
|
||||
class LocalFilesystem : public VFS
|
||||
{
|
||||
public:
|
||||
|
||||
Tesses::Framework::Streams::Stream* OpenFile(VFSPath path, std::string mode);
|
||||
|
||||
void CreateDirectory(VFSPath path);
|
||||
void DeleteDirectory(VFSPath path);
|
||||
bool RegularFileExists(VFSPath path);
|
||||
@ -15,11 +19,14 @@ namespace Tesses::Framework::Filesystem
|
||||
bool SocketFileExists(VFSPath path);
|
||||
bool FIFOFileExists(VFSPath path);
|
||||
bool DirectoryExists(VFSPath path);
|
||||
|
||||
void DeleteFile(VFSPath path);
|
||||
void CreateSymlink(VFSPath existingFile, VFSPath symlinkFile);
|
||||
VFSPathEnumerator EnumeratePaths(VFSPath path);
|
||||
void CreateHardlink(VFSPath existingFile, VFSPath newName);
|
||||
|
||||
void MoveFile(VFSPath src, VFSPath dest);
|
||||
|
||||
void MoveDirectory(VFSPath src, VFSPath dest);
|
||||
VFSPath ReadLink(VFSPath path);
|
||||
std::string VFSPathToSystem(VFSPath path);
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
#pragma once
|
||||
#include "VFS.hpp"
|
||||
#include "VFSFix.hpp"
|
||||
|
||||
namespace Tesses::Framework::Filesystem
|
||||
{
|
||||
class MountableDirectory {
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
#pragma once
|
||||
#include "VFS.hpp"
|
||||
#include "VFSFix.hpp"
|
||||
|
||||
namespace Tesses::Framework::Filesystem
|
||||
{
|
||||
class NullFilesystem : public VFS
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
#pragma once
|
||||
#include "VFS.hpp"
|
||||
#include "VFSFix.hpp"
|
||||
|
||||
namespace Tesses::Framework::Filesystem
|
||||
{
|
||||
class SubdirFilesystem : public VFS
|
||||
|
||||
@ -3,6 +3,8 @@
|
||||
#include "../Streams/Stream.hpp"
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
#include "VFSFix.hpp"
|
||||
|
||||
namespace Tesses::Framework::Filesystem
|
||||
{
|
||||
class VFSPath {
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
#pragma once
|
||||
#if defined(GEKKO)
|
||||
#if defined(_WIN32)
|
||||
#include <windows.h>
|
||||
#elif defined(GEKKO)
|
||||
#include <ogc/mutex.h>
|
||||
#else
|
||||
#include <threads.h>
|
||||
@ -7,7 +9,9 @@
|
||||
namespace Tesses::Framework::Threading
|
||||
{
|
||||
class Mutex {
|
||||
#if defined(GEKKO)
|
||||
#if defined(_WIN32)
|
||||
HANDLE mtx;
|
||||
#elif defined(GEKKO)
|
||||
mutex_t mtx;
|
||||
#else
|
||||
mtx_t mtx;
|
||||
|
||||
@ -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