[ion/src/simulator] Add headers and fix Macros for iOS

Change-Id: I0f1f888e4823fc9a80a7ac986cf8732dc9df2998
This commit is contained in:
Hugo Saint-Vignes
2020-10-07 10:42:26 +02:00
parent 382c303bd2
commit 3686f819d6
2 changed files with 6 additions and 2 deletions

View File

@@ -30,6 +30,9 @@ LDFLAGS += -framework CoreData
LDFLAGS += -Lion/src/simulator/ios/GoogleAnalyticsServices
endif
LDFLAGS += -framework MobileCoreServices
LDFLAGS += -framework ImageIO
ifndef ARCH
# App resources

View File

@@ -1,10 +1,11 @@
#include "../platform.h"
#include <SDL.h>
#include <TargetConditionals.h>
#if TARGET_OS_MAC
#if TARGET_OS_OSX
#include <AppKit/AppKit.h>
#else
#include <UIKit/UIKit.h>
#include <MobileCoreServices/MobileCoreServices.h>
#endif
namespace Ion {
@@ -31,7 +32,7 @@ static CGContextRef createABGR8888Context(size_t width, size_t height) {
SDL_Texture * loadImage(SDL_Renderer * renderer, const char * identifier) {
CGImageRef image = nullptr;
#if TARGET_OS_MAC
#if TARGET_OS_OSX
//http://lists.libsdl.org/pipermail/commits-libsdl.org/2016-December/001235.html
[[[NSApp windows] firstObject] setColorSpace:[NSColorSpace sRGBColorSpace]];