summaryrefslogtreecommitdiff
path: root/macosx
diff options
context:
space:
mode:
Diffstat (limited to 'macosx')
-rw-r--r--macosx/main.mm38
1 files changed, 6 insertions, 32 deletions
diff --git a/macosx/main.mm b/macosx/main.mm
index c6cc04d843..8d2b0d8ce9 100644
--- a/macosx/main.mm
+++ b/macosx/main.mm
@@ -1,40 +1,14 @@
-#import <Foundation/Foundation.h>
-#import <AppKit/AppKit.h>
+// #import <Foundation/Foundation.h>
+// #import <AppKit/AppKit.h>
#include "settings.hpp"
#include "../common/glfw_view.hpp"
-#include <cstdio>
-
-#include <thread>
-
-MapView *mapView = nullptr;
-
int main() {
llmr::Settings_MacOSX settings;
- mapView = new MapView(settings);
- mapView->init();
- int ret = mapView->run();
- mapView->settings.sync();
- delete mapView;
+ MapView view(settings);
+ view.init();
+ int ret = view.run();
+ settings.sync();
return ret;
}
-
-
-
-namespace llmr {
-
-void platform::cleanup() {
- // noop
-}
-
-void platform::restart() {
- if (mapView) {
- mapView->dirty = true;
- CGEventRef event = CGEventCreate(NULL);
- CGEventSetType(event, kCGEventMouseMoved);
- [[NSApplication sharedApplication] postEvent: [NSEvent eventWithCGEvent:event] atStart:NO];
- }
-}
-
-}