implement save request on OSX, add Quick Look extentions

This commit is contained in:
2018-07-31 00:38:10 +02:00
parent 87fcea61b8
commit 5a37f578cb
18 changed files with 814 additions and 20 deletions

View File

@@ -10,6 +10,22 @@
#import "GameViewController.h"
#include "app.h"
void global_exception_handler(NSException* e)
{
if (App::I.canvas && App::I.canvas->m_canvas)
App::I.canvas->m_canvas->project_save_thread(App::I.data_path + "/recovery.pano");
std::terminate();
}
void global_signal_handler(int e)
{
if (App::I.canvas && App::I.canvas->m_canvas)
App::I.canvas->m_canvas->project_save_thread(App::I.data_path + "/recovery.pano");
std::terminate();
}
@interface AppDelegate () {
GameViewController* view;
}
@@ -18,9 +34,15 @@
@implementation AppDelegate
- (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options
{
App::I.canvas->m_canvas->project_open([url fileSystemRepresentation]);
return true;
}
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Override point for customization after application launch.
NSSetUncaughtExceptionHandler(&global_exception_handler);
view = (GameViewController*)self.window.rootViewController;
return YES;
}