comparison render_sdl.c @ 1026:7267bc1ab547

Fix bug in 68K movep.l when the destination is a register mapped to a host register
author Michael Pavone <pavone@retrodev.com>
date Tue, 10 May 2016 08:59:17 -0700
parents fc000f245cc8
children 56b1748a8473
comparison
equal deleted inserted replaced
1025:01a91df5b87c 1026:7267bc1ab547
552 } 552 }
553 } 553 }
554 return -1; 554 return -1;
555 } 555 }
556 556
557 uint8_t scancode_map[SDL_NUM_SCANCODES] = {
558 [SDL_SCANCODE_A] = 0x1C,
559 [SDL_SCANCODE_B] = 0x32,
560 [SDL_SCANCODE_C] = 0x21,
561 [SDL_SCANCODE_D] = 0x23,
562 [SDL_SCANCODE_E] = 0x24,
563 [SDL_SCANCODE_F] = 0x28,
564 [SDL_SCANCODE_G] = 0x34,
565 [SDL_SCANCODE_H] = 0x33,
566 [SDL_SCANCODE_I] = 0x43,
567 [SDL_SCANCODE_J] = 0x3B,
568 [SDL_SCANCODE_K] = 0x42,
569 [SDL_SCANCODE_L] = 0x4B,
570 [SDL_SCANCODE_M] = 0x3A,
571 [SDL_SCANCODE_N] = 0x31,
572 [SDL_SCANCODE_O] = 0x44,
573 [SDL_SCANCODE_P] = 0x4D,
574 [SDL_SCANCODE_Q] = 0x15,
575 [SDL_SCANCODE_R] = 0x2D,
576 [SDL_SCANCODE_S] = 0x1B,
577 [SDL_SCANCODE_T] = 0x2C,
578 [SDL_SCANCODE_U] = 0x3C,
579 [SDL_SCANCODE_V] = 0x2A,
580 [SDL_SCANCODE_W] = 0x1D,
581 [SDL_SCANCODE_X] = 0x22,
582 [SDL_SCANCODE_Y] = 0x35,
583 [SDL_SCANCODE_Z] = 0x1A,
584 [SDL_SCANCODE_1] = 0x16,
585 [SDL_SCANCODE_2] = 0x1E,
586 [SDL_SCANCODE_3] = 0x26,
587 [SDL_SCANCODE_4] = 0x25,
588 [SDL_SCANCODE_5] = 0x2E,
589 [SDL_SCANCODE_6] = 0x36,
590 [SDL_SCANCODE_7] = 0x3D,
591 [SDL_SCANCODE_8] = 0x3E,
592 [SDL_SCANCODE_9] = 0x46,
593 [SDL_SCANCODE_0] = 0x45,
594 [SDL_SCANCODE_RETURN] = 0x5A,
595 [SDL_SCANCODE_SPACE] = 0x29
596 };
597
557 int32_t handle_event(SDL_Event *event) 598 int32_t handle_event(SDL_Event *event)
558 { 599 {
559 switch (event->type) { 600 switch (event->type) {
560 case SDL_KEYDOWN: 601 case SDL_KEYDOWN:
561 handle_keydown(event->key.keysym.sym); 602 handle_keydown(event->key.keysym.sym, scancode_map[event->key.keysym.scancode]);
562 break; 603 break;
563 case SDL_KEYUP: 604 case SDL_KEYUP:
564 handle_keyup(event->key.keysym.sym); 605 handle_keyup(event->key.keysym.sym, scancode_map[event->key.keysym.scancode]);
565 break; 606 break;
566 case SDL_JOYBUTTONDOWN: 607 case SDL_JOYBUTTONDOWN:
567 handle_joydown(find_joystick_index(event->jbutton.which), event->jbutton.button); 608 handle_joydown(find_joystick_index(event->jbutton.which), event->jbutton.button);
568 break; 609 break;
569 case SDL_JOYBUTTONUP: 610 case SDL_JOYBUTTONUP: