mirror of
https://github.com/elasota/Aerofoil.git
synced 2025-12-14 03:59:36 +00:00
First compile, Logger works
This commit is contained in:
@@ -9,8 +9,13 @@
|
||||
|
||||
#include "PLDrivers.h"
|
||||
|
||||
#ifdef __MACOS__
|
||||
#include <SDL.h>
|
||||
#include <SDL_rwops.h>
|
||||
#else
|
||||
#include "SDL2/SDL.h"
|
||||
#include "SDL2/SDL_rwops.h"
|
||||
#endif
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
@@ -22,7 +27,7 @@
|
||||
|
||||
#include "UTF8.h"
|
||||
|
||||
#ifdef __CYGWIN__
|
||||
#if defined(__CYGWIN__) || defined(__MACOS__)
|
||||
typedef off_t off64_t;
|
||||
#define fstat64 fstat
|
||||
#define fseek64 fseek
|
||||
@@ -183,6 +188,9 @@ bool GpFileSystem_X::ResolvePath(PortabilityLayer::VirtualDirectory_t virtualDir
|
||||
case PortabilityLayer::VirtualDirectories::kFontCache:
|
||||
prefsAppend = "FontCache";
|
||||
break;
|
||||
case PortabilityLayer::VirtualDirectories::kLogs:
|
||||
prefsAppend = "..";
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
};
|
||||
@@ -289,6 +297,7 @@ GpIOStream *GpFileSystem_X::OpenFileNested(PortabilityLayer::VirtualDirectory_t
|
||||
return nullptr;
|
||||
|
||||
std::string resolvedPath;
|
||||
|
||||
if (!ResolvePath(virtualDirectory, subPaths, numSubPaths, resolvedPath))
|
||||
return nullptr;
|
||||
|
||||
|
||||
@@ -26,15 +26,17 @@ IGpDisplayDriver *GpDriver_CreateDisplayDriver_SDL_GL2(const GpDisplayDriverProp
|
||||
IGpAudioDriver *GpDriver_CreateAudioDriver_SDL(const GpAudioDriverProperties &properties);
|
||||
IGpInputDriver *GpDriver_CreateInputDriver_SDL2_Gamepad(const GpInputDriverProperties &properties);
|
||||
|
||||
|
||||
#ifdef __MACOS__
|
||||
int main(int argc, char *argv[])
|
||||
#else
|
||||
SDLMAIN_DECLSPEC int SDL_main(int argc, char *argv[])
|
||||
#endif
|
||||
{
|
||||
GpLogDriver_X::Init();
|
||||
|
||||
if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_GAMECONTROLLER) < 0)
|
||||
return -1;
|
||||
|
||||
GpFileSystem_X::GetInstance()->Init();
|
||||
GpLogDriver_X::Init();
|
||||
|
||||
IGpLogDriver *logger = GpLogDriver_X::GetInstance();
|
||||
GpDriverCollection *drivers = GpAppInterface_Get()->PL_GetDriverCollection();
|
||||
|
||||
@@ -2,7 +2,13 @@
|
||||
|
||||
#include "IGpClipboardContents.h"
|
||||
#include "IGpThreadEvent.h"
|
||||
|
||||
#ifdef __MACOS__
|
||||
#include <SDL.h>
|
||||
#include <pthread.h>
|
||||
#else
|
||||
#include "SDL2/SDL.h"
|
||||
#endif
|
||||
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
|
||||
Reference in New Issue
Block a user