(OSX/platform.m) Cleanups

This commit is contained in:
Twinaphex 2014-10-18 06:06:27 +02:00
parent 7ba2e87187
commit 4418853e54
2 changed files with 10 additions and 7 deletions

View File

@ -52,16 +52,19 @@ void apple_rarch_exited(void)
case NSKeyUp:
{
NSString* ch = (NSString*)event.characters;
if (!ch || ch.length == 0)
apple_input_keyboard_event(event_type == NSKeyDown, event.keyCode, 0, 0);
else
uint32_t character = 0;
uint32_t mod = 0;
if (ch && ch.length != 0)
{
apple_input_keyboard_event(event_type == NSKeyDown, event.keyCode, [ch characterAtIndex:0], event.modifierFlags);
character = [ch characterAtIndex:0];
mod = event.modifierFlags;
for (NSUInteger i = 1; i < ch.length; i ++)
apple_input_keyboard_event(event_type == NSKeyDown, 0, [ch characterAtIndex:i], event.modifierFlags);
}
apple_input_keyboard_event(event_type == NSKeyDown, event.keyCode, character, mod);
}
break;
case NSFlagsChanged:

View File

@ -244,7 +244,7 @@ NSWindowDelegate>
else
{
char buffer[PATH_MAX];
rarch_setting_t* setting_data, *setting = NULL;
rarch_setting_t *setting_data = NULL, *setting = NULL;
setting_data = (rarch_setting_t*)driver.menu->list_settings;
setting = (rarch_setting_t*)&setting_data[[item intValue]];