mirror of https://github.com/bsnes-emu/bsnes.git
macOS fixes.
This commit is contained in:
parent
5ba538ee39
commit
ab25877af4
|
@ -17,11 +17,11 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
-(void) textDidChange:(NSNotification*)n {
|
-(void) textDidChange:(NSNotification*)n {
|
||||||
|
lineEdit->state.text = [[self stringValue] UTF8String];
|
||||||
lineEdit->doChange();
|
lineEdit->doChange();
|
||||||
}
|
}
|
||||||
|
|
||||||
-(IBAction) activate:(id)sender {
|
-(IBAction) activate:(id)sender {
|
||||||
lineEdit->state.text = [[self stringValue] UTF8String];
|
|
||||||
lineEdit->doActivate();
|
lineEdit->doActivate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -329,12 +329,12 @@ auto Video::hasMonitors() -> vector<Monitor> {
|
||||||
auto dictionary = IODisplayCreateInfoDictionary(displayPort, 0);
|
auto dictionary = IODisplayCreateInfoDictionary(displayPort, 0);
|
||||||
if(auto names = CFDictionaryGetValue(dictionary, CFSTR(kDisplayProductName))) {
|
if(auto names = CFDictionaryGetValue(dictionary, CFSTR(kDisplayProductName))) {
|
||||||
auto languageKeys = CFArrayCreateMutable(kCFAllocatorDefault, 0, &kCFTypeArrayCallBacks);
|
auto languageKeys = CFArrayCreateMutable(kCFAllocatorDefault, 0, &kCFTypeArrayCallBacks);
|
||||||
CFDictionaryApplyFunction(names, MonitorKeyArrayCallback, (void*)languageKeys);
|
CFDictionaryApplyFunction((CFDictionaryRef)names, MonitorKeyArrayCallback, (void*)languageKeys);
|
||||||
auto orderLanguageKeys = CFBundleCopyPreferredLocalizationsFromArray(languageKeys);
|
auto orderLanguageKeys = CFBundleCopyPreferredLocalizationsFromArray(languageKeys);
|
||||||
CFRelease(languageKeys);
|
CFRelease(languageKeys);
|
||||||
if(orderLanguageKeys && CFArrayGetCount(orderLanguageKeys)) {
|
if(orderLanguageKeys && CFArrayGetCount(orderLanguageKeys)) {
|
||||||
auto languageKey = CFArrayGetValueAtIndex(orderLanguageKeys, 0);
|
auto languageKey = CFArrayGetValueAtIndex(orderLanguageKeys, 0);
|
||||||
auto localName = CFDictionaryGetValue(names, languageKey);
|
auto localName = CFDictionaryGetValue((CFDictionaryRef)names, languageKey);
|
||||||
monitor.name = {1 + monitors.size(), ": ", [(__bridge NSString*)localName UTF8String]};
|
monitor.name = {1 + monitors.size(), ": ", [(__bridge NSString*)localName UTF8String]};
|
||||||
CFRelease(localName);
|
CFRelease(localName);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue