Mercurial > repos > blastem
comparison libblastem.c @ 1689:7f42a93f18a4
Have a suitable default IO port configuration when nonIO is present from the config file. Fixed off by one in processing gamepad button events in libretro build
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Sun, 20 Jan 2019 19:52:54 -0800 |
parents | 395f684c5379 |
children | 319d90025d50 |
comparison
equal
deleted
inserted
replaced
1688:395f684c5379 | 1689:7f42a93f18a4 |
---|---|
252 for (int id = RETRO_DEVICE_ID_JOYPAD_B; id < RETRO_DEVICE_ID_JOYPAD_L2; id++) | 252 for (int id = RETRO_DEVICE_ID_JOYPAD_B; id < RETRO_DEVICE_ID_JOYPAD_L2; id++) |
253 { | 253 { |
254 int16_t new_state = retro_input_state(port, RETRO_DEVICE_JOYPAD, 0, id); | 254 int16_t new_state = retro_input_state(port, RETRO_DEVICE_JOYPAD, 0, id); |
255 if (new_state != prev_state[port][id]) { | 255 if (new_state != prev_state[port][id]) { |
256 if (new_state) { | 256 if (new_state) { |
257 current_system->gamepad_down(current_system, port, map[id]); | 257 current_system->gamepad_down(current_system, port + 1, map[id]); |
258 } else { | 258 } else { |
259 current_system->gamepad_up(current_system, port, map[id]); | 259 current_system->gamepad_up(current_system, port + 1, map[id]); |
260 } | 260 } |
261 prev_state[port][id] = new_state; | 261 prev_state[port][id] = new_state; |
262 } | 262 } |
263 } | 263 } |
264 } | 264 } |