mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-26 23:10:38 +00:00
Non-windows button mapping tweaks
This commit is contained in:
parent
ed68dea0d5
commit
9fe6dcb863
@ -109,6 +109,7 @@ void EmuScreen::update(InputState &input)
|
||||
|
||||
if (invalid_)
|
||||
return;
|
||||
|
||||
// First translate touches into pad input.
|
||||
UpdateGamepad(input);
|
||||
UpdateInputState(&input);
|
||||
@ -117,8 +118,8 @@ void EmuScreen::update(InputState &input)
|
||||
|
||||
static const int mapping[12][2] = {
|
||||
{PAD_BUTTON_A, CTRL_CROSS},
|
||||
{PAD_BUTTON_B, CTRL_SQUARE},
|
||||
{PAD_BUTTON_X, CTRL_CIRCLE},
|
||||
{PAD_BUTTON_B, CTRL_CIRCLE},
|
||||
{PAD_BUTTON_X, CTRL_SQUARE},
|
||||
{PAD_BUTTON_Y, CTRL_TRIANGLE},
|
||||
{PAD_BUTTON_UP, CTRL_UP},
|
||||
{PAD_BUTTON_DOWN, CTRL_DOWN},
|
||||
@ -127,15 +128,18 @@ void EmuScreen::update(InputState &input)
|
||||
{PAD_BUTTON_LBUMPER, CTRL_LTRIGGER},
|
||||
{PAD_BUTTON_RBUMPER, CTRL_RTRIGGER},
|
||||
{PAD_BUTTON_START, CTRL_START},
|
||||
{PAD_BUTTON_BACK, CTRL_SELECT},
|
||||
{PAD_BUTTON_SELECT, CTRL_SELECT},
|
||||
};
|
||||
|
||||
for (int i = 0; i < 12; i++) {
|
||||
if (input.pad_buttons_down & mapping[i][0])
|
||||
if (input.pad_buttons_down & mapping[i][0]) {
|
||||
__CtrlButtonDown(mapping[i][1]);
|
||||
if (input.pad_buttons_up & mapping[i][0])
|
||||
}
|
||||
if (input.pad_buttons_up & mapping[i][0]) {
|
||||
__CtrlButtonUp(mapping[i][1]);
|
||||
}
|
||||
}
|
||||
__CtrlSetAnalog(input.pad_lstick_x, input.pad_lstick_y);
|
||||
|
||||
if (input.pad_buttons_down & (PAD_BUTTON_MENU | PAD_BUTTON_BACK)) {
|
||||
fbo_unbind();
|
||||
|
@ -40,6 +40,7 @@
|
||||
#include "../../Core/PSPMixer.h"
|
||||
#include "../../Core/CPU.h"
|
||||
#include "../../Core/Config.h"
|
||||
#include "../../Core/HLE/sceCtrl.h"
|
||||
#include "../../Core/Host.h"
|
||||
#include "../../Common/MemArena.h"
|
||||
|
||||
|
2
native
2
native
@ -1 +1 @@
|
||||
Subproject commit 8fd4f592ad44655031e3111a8594a6dfc1b195a4
|
||||
Subproject commit 15563281297adb62c8e690fc063a9bf4442fcfc7
|
Loading…
Reference in New Issue
Block a user