add support for Apple Pencil and build for iOS

This commit is contained in:
2017-07-28 20:35:59 +01:00
parent e32329ea98
commit 0907429a60
15 changed files with 236 additions and 35 deletions

View File

@@ -4,6 +4,10 @@
#include "node_icon.h"
#include "node_dialog_open.h"
#ifdef __APPLE__
#include <Foundation/Foundation.h>
#endif
using namespace ui;
App App::I; // singleton
@@ -84,7 +88,13 @@ void App::init()
LOG("Screen Resolution: %dx%d", (int)width, (int)height);
zoom = ceilf(width / 1000.f);
zoom = ceilf(width / 2000.f);
#ifdef __IOS__
NSArray* paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString* docpath = [paths objectAtIndex:0];
data_path = [docpath cStringUsingEncoding:NSASCIIStringEncoding];
#endif
glDisable(GL_DEPTH_TEST);
#if defined(_WIN32) || defined(__OSX__)