mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-05 15:27:46 -04:00
extracted OSS code to sndout_oss_*, BTN->PBTN, refactoring
git-svn-id: file:///home/notaz/opt/svn/PicoDrive@599 be3aeb3a-fb24-0410-a615-afba39da0efa
This commit is contained in:
parent
7b3f44c6b6
commit
e5ab6fafac
25 changed files with 497 additions and 589 deletions
|
@ -224,11 +224,11 @@ unsigned int psp_pad_read(int blocking)
|
|||
buttons = pad.Buttons;
|
||||
|
||||
// analog..
|
||||
buttons &= ~(BTN_NUB_UP|BTN_NUB_DOWN|BTN_NUB_LEFT|BTN_NUB_RIGHT);
|
||||
if (pad.Lx < 128 - ANALOG_DEADZONE) buttons |= BTN_NUB_LEFT;
|
||||
if (pad.Lx > 128 + ANALOG_DEADZONE) buttons |= BTN_NUB_RIGHT;
|
||||
if (pad.Ly < 128 - ANALOG_DEADZONE) buttons |= BTN_NUB_UP;
|
||||
if (pad.Ly > 128 + ANALOG_DEADZONE) buttons |= BTN_NUB_DOWN;
|
||||
buttons &= ~(PBTN_NUB_UP|PBTN_NUB_DOWN|PBTN_NUB_LEFT|PBTN_NUB_RIGHT);
|
||||
if (pad.Lx < 128 - ANALOG_DEADZONE) buttons |= PBTN_NUB_LEFT;
|
||||
if (pad.Lx > 128 + ANALOG_DEADZONE) buttons |= PBTN_NUB_RIGHT;
|
||||
if (pad.Ly < 128 - ANALOG_DEADZONE) buttons |= PBTN_NUB_UP;
|
||||
if (pad.Ly > 128 + ANALOG_DEADZONE) buttons |= PBTN_NUB_DOWN;
|
||||
|
||||
return buttons;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue