macOS: Ignore when the global shortcut is disabled

This commit is contained in:
pagedown 2022-02-11 14:23:57 +08:00
parent 8fbe96744b
commit 444d9bd341
No known key found for this signature in database
GPG key ID: E921CF18AC8FF6EB

View file

@ -593,11 +593,12 @@ - (void)render_frame_received:(id)displayIDAsID
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;