From 18dd91197fca9c4666744852f1fcb204f1a3d7a3 Mon Sep 17 00:00:00 2001 From: Yuval Dolev Date: Tue, 24 Dec 2019 02:53:25 +0200 Subject: [PATCH] The new (very basic) macOS platform layer compiles! --- platform_mac/mac_4ed.mm | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/platform_mac/mac_4ed.mm b/platform_mac/mac_4ed.mm index 34991d33..0c7a2c5e 100644 --- a/platform_mac/mac_4ed.mm +++ b/platform_mac/mac_4ed.mm @@ -1,5 +1,29 @@ #include +@interface App_Delegate : NSObject +@end + +@implementation App_Delegate +- (void)applicationDidFinishLaunching:(id)sender{ +} + +- (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication*)sender{ + return YES; +} + +- (void)applicationWillTerminate:(NSNotification *)notification{ +} + +- (NSSize)windowWillResize:(NSWindow*)window toSize:(NSSize)frame_size{ + // frame_size.height = ((f32)frame_size.width / global_aspect_ratio); + return frame_size; +} + +- (void)windowWillClose:(id)sender { + // global_running = false; +} +@end + int main(int arg_count, char **args){ @autoreleasepool{