From 444d9bd341660f256c03eba4ef1b19527d4d48c5 Mon Sep 17 00:00:00 2001 From: pagedown Date: Fri, 11 Feb 2022 14:23:57 +0800 Subject: [PATCH] macOS: Ignore when the global shortcut is disabled --- glfw/cocoa_init.m | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/glfw/cocoa_init.m b/glfw/cocoa_init.m index 7bfde27cd..606ba4bd0 100644 --- a/glfw/cocoa_init.m +++ b/glfw/cocoa_init.m @@ -593,11 +593,12 @@ build_global_shortcuts_lookup(void) { NSInteger sc = [key integerValue]; NSDictionary *sc_value = obj; id enabled = [sc_value objectForKey:@"enabled"]; - if (!enabled || ![enabled isKindOfClass:[NSNumber class]] ) continue; + if (!enabled || ![enabled isKindOfClass:[NSNumber class]]) continue; [temp_configured addObject:@(sc)]; + if (![enabled boolValue]) continue; id v = [sc_value objectForKey:@"value"]; if (!v || ![v isKindOfClass:[NSDictionary class]]) { - if ([(NSNumber*)enabled intValue]) [temp_missing_value addObject:@(sc)]; + if ([enabled boolValue]) [temp_missing_value addObject:@(sc)]; continue; } NSDictionary *value = v;