mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-05 15:27:46 -04:00
key combos for new input code
git-svn-id: file:///home/notaz/opt/svn/PicoDrive@690 be3aeb3a-fb24-0410-a615-afba39da0efa
This commit is contained in:
parent
cc33f567ae
commit
9025b93159
13 changed files with 129 additions and 165 deletions
|
@ -446,40 +446,13 @@ static void updateKeys(void)
|
|||
static unsigned int prevEvents = 0;
|
||||
int i;
|
||||
|
||||
/* FIXME: port to input fw */
|
||||
keys = Framework_PollGetButtons();
|
||||
if (keys & PBTN_HOME)
|
||||
engineState = PGS_Menu;
|
||||
|
||||
keys &= CONFIGURABLE_KEYS;
|
||||
|
||||
for (i = 0; i < 32; i++)
|
||||
{
|
||||
if (keys & (1 << i))
|
||||
{
|
||||
int pl, acts = currentConfig.KeyBinds[i];
|
||||
if (!acts) continue;
|
||||
pl = (acts >> 16) & 1;
|
||||
if (kb_combo_keys & (1 << i))
|
||||
{
|
||||
int u = i+1, acts_c = acts & kb_combo_acts;
|
||||
// let's try to find the other one
|
||||
if (acts_c) {
|
||||
for (; u < 32; u++)
|
||||
if ( (keys & (1 << u)) && (currentConfig.KeyBinds[u] & acts_c) ) {
|
||||
allActions[pl] |= acts_c & currentConfig.KeyBinds[u];
|
||||
keys &= ~((1 << i) | (1 << u));
|
||||
break;
|
||||
}
|
||||
}
|
||||
// add non-combo actions if combo ones were not found
|
||||
if (!acts_c || u == 32)
|
||||
allActions[pl] |= acts & ~kb_combo_acts;
|
||||
} else {
|
||||
allActions[pl] |= acts;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
PicoPad[0] = allActions[0] & 0xfff;
|
||||
PicoPad[1] = allActions[1] & 0xfff;
|
||||
|
||||
|
@ -548,7 +521,6 @@ void emu_Loop(void)
|
|||
else PicoOpt&=~0x4000;
|
||||
Pico.m.dirtyPal = 1;
|
||||
oldmodes = ((Pico.video.reg[12]&1)<<2) ^ 0xc;
|
||||
emu_findKeyBindCombos();
|
||||
|
||||
// pal/ntsc might have changed, reset related stuff
|
||||
target_fps = Pico.m.pal ? 50 : 60;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue