diff --git a/platform_mac/mac_4ed.m b/platform_mac/mac_4ed.m index 19f76c0b..af4646d1 100644 --- a/platform_mac/mac_4ed.m +++ b/platform_mac/mac_4ed.m @@ -225,7 +225,7 @@ static i32 did_update_for_clipboard = true; - (void)init_gl { - if(osx_objc.running){ + if (osx_objc.gl_is_initialized){ return; } @@ -253,7 +253,7 @@ static i32 did_update_for_clipboard = true; [context makeCurrentContext]; - osx_objc.running = true; + osx_objc.gl_is_initialized = true; } - (id)init @@ -873,6 +873,7 @@ main(int argc, char **argv){ userInfo: nil repeats:YES]; osx_init(); + osx_objc.running = true; [NSApp run]; } diff --git a/platform_mac/osx_objective_c_to_cpp_links.h b/platform_mac/osx_objective_c_to_cpp_links.h index 8fbb10dd..11c98287 100644 --- a/platform_mac/osx_objective_c_to_cpp_links.h +++ b/platform_mac/osx_objective_c_to_cpp_links.h @@ -36,6 +36,7 @@ typedef struct OSX_Keyboard_Modifiers{ typedef struct OSX_Objective_C_Vars{ i32 width, height; + b32 gl_is_initialized; b32 running; u32 key_count; u32 keys[8];