implement save request on OSX, add Quick Look extentions
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user