void set_keys( short *keycodes) { short index; struct key_definition *definitions; /* all of them have the same ordering, so which one we pick is moot. */ definitions = all_key_definitions[_standard_keyboard_setup]; for (index= 0; index<NUMBER_OF_STANDARD_KEY_DEFINITIONS; index++) { current_key_definitions[index].offset= keycodes[index]; current_key_definitions[index].action_flag= definitions[index].action_flag; assert(current_key_definitions[index].offset <= 0x7f); } precalculate_key_information(); return; }
void set_keys( short *keycodes) { struct key_definition *definitions; /* all of them have the same ordering, so which one we pick is moot. */ definitions = all_key_definitions[_standard_keyboard_setup]; for (unsigned index= 0; index<NUMBER_OF_STANDARD_KEY_DEFINITIONS; index++) { #ifdef SDL current_key_definitions[index].offset= SDLKey(keycodes[index]); #else current_key_definitions[index].offset= keycodes[index]; #endif current_key_definitions[index].action_flag= definitions[index].action_flag; #ifdef mac assert(current_key_definitions[index].offset <= 0x7f); #endif } precalculate_key_information(); }