src/mess/machine/amigakbd.c
| r2730 | r2731 | |
| 58 | 58 | static INPUT_CHANGED( kbd_update ) |
| 59 | 59 | { |
| 60 | 60 | int index = *( (int*)(param) ), i; |
| 61 | | UINT32 delta = oldval ^ newval; |
| 61 | UINT32 oldvalue = oldval * field->mask, newvalue = newval * field->mask; |
| 62 | UINT32 delta = oldvalue ^ newvalue; |
| 62 | 63 | |
| 63 | 64 | /* Special case Page UP, which we will use as Action Replay button */ |
| 64 | | if ( (index == 3) && ( delta & 0x80000000 ) && ( newval & 0x80000000 ) ) |
| 65 | if ( (index == 3) && ( delta & 0x80000000 ) && ( newvalue & 0x80000000 ) ) |
| 65 | 66 | { |
| 66 | 67 | const amiga_machine_interface *amiga_intf = amiga_get_interface(); |
| 67 | 68 | |
| r2730 | r2731 | |
| 78 | 79 | { |
| 79 | 80 | if ( delta & ( 1 << i ) ) |
| 80 | 81 | { |
| 81 | | int down = ( newval & ( 1 << i ) ) ? 0 : 1; |
| 82 | int down = ( newvalue & ( 1 << i ) ) ? 0 : 1; |
| 82 | 83 | int scancode = ( ( (index*32)+i ) << 1 ) | down; |
| 83 | 84 | int amigacode = ~scancode; |
| 84 | 85 | |