mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Fix touch buttons that got broken. Also, make the onscreen turbo a pure unthrottle, I don't understand how the other is supposed to work heh (checking iFrameLimit?)
This commit is contained in:
parent
d1cc98c2fc
commit
a4e95e5ce9
2 changed files with 17 additions and 17 deletions
|
@ -186,9 +186,6 @@ void EmuScreen::onVKeyDown(int virtualKeyCode) {
|
|||
I18NCategory *s = GetI18NCategory("Screen");
|
||||
|
||||
switch (virtualKeyCode) {
|
||||
case VIRTKEY_UNTHROTTLE:
|
||||
PSP_CoreParameter().unthrottle = true;
|
||||
break;
|
||||
case VIRTKEY_SPEED_TOGGLE:
|
||||
if (PSP_CoreParameter().fpsLimit == 0) {
|
||||
PSP_CoreParameter().fpsLimit = 1;
|
||||
|
@ -212,8 +209,7 @@ void EmuScreen::onVKeyDown(int virtualKeyCode) {
|
|||
|
||||
void EmuScreen::onVKeyUp(int virtualKeyCode) {
|
||||
switch (virtualKeyCode) {
|
||||
case VIRTKEY_UNTHROTTLE:
|
||||
PSP_CoreParameter().unthrottle = false;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -259,7 +255,7 @@ static const struct { int from, to; } legacy_touch_mapping[12] = {
|
|||
{PAD_BUTTON_X, CTRL_SQUARE},
|
||||
{PAD_BUTTON_Y, CTRL_TRIANGLE},
|
||||
{PAD_BUTTON_START, CTRL_START},
|
||||
{PAD_BUTTON_BACK, CTRL_SELECT},
|
||||
{PAD_BUTTON_SELECT, CTRL_SELECT},
|
||||
{PAD_BUTTON_LBUMPER, CTRL_LTRIGGER},
|
||||
{PAD_BUTTON_RBUMPER, CTRL_RTRIGGER},
|
||||
{PAD_BUTTON_UP, CTRL_UP},
|
||||
|
@ -335,11 +331,15 @@ void EmuScreen::update(InputState &input) {
|
|||
// Also send the special buttons to input, since that's where they're handled.
|
||||
input.pad_buttons_down |= fakeInputState.pad_buttons_down & (PAD_BUTTON_MENU | PAD_BUTTON_BACK | PAD_BUTTON_RIGHT_THUMB | PAD_BUTTON_LEFT_THUMB);
|
||||
input.pad_buttons_up |= fakeInputState.pad_buttons_up & (PAD_BUTTON_MENU | PAD_BUTTON_BACK | PAD_BUTTON_RIGHT_THUMB | PAD_BUTTON_LEFT_THUMB);
|
||||
|
||||
input.pad_buttons = fakeInputState.pad_buttons;
|
||||
#ifdef _WIN32
|
||||
}
|
||||
#endif
|
||||
|
||||
// Still checking input.pad_buttons here to support the onscreen throttle button.
|
||||
PSP_CoreParameter().unthrottle = virtKeys[VIRTKEY_UNTHROTTLE - VIRTKEY_FIRST] ||
|
||||
(input.pad_buttons & PAD_BUTTON_UNTHROTTLE) != 0;
|
||||
|
||||
// Apply tilt to left stick
|
||||
if (g_Config.bAccelerometerToAnalogHoriz) {
|
||||
// TODO: Deadzone, etc.
|
||||
|
|
|
@ -36,7 +36,7 @@ TouchButton buttonStart(&ui_atlas, I_RECT, I_START, PAD_BUTTON_START);
|
|||
TouchButton buttonLShoulder(&ui_atlas, I_SHOULDER, I_L, PAD_BUTTON_LBUMPER);
|
||||
TouchButton buttonRShoulder(&ui_atlas, I_SHOULDER, I_R, PAD_BUTTON_RBUMPER, 0, true);
|
||||
TouchButton buttonTurbo(&ui_atlas, I_RECT, I_ARROW, PAD_BUTTON_UNTHROTTLE, 180);
|
||||
TouchButton buttonVPS(&ui_atlas, I_RECT, I_ARROW, PAD_BUTTON_LEFT_THUMB, 180);
|
||||
//TouchButton buttonVPS(&ui_atlas, I_RECT, I_ARROW, PAD_BUTTON_LEFT_THUMB, 180);
|
||||
TouchCrossPad crossPad(&ui_atlas, I_DIR, I_ARROW);
|
||||
#if USE_PAUSE_BUTTON
|
||||
TouchButton buttonPause(&ui_atlas, I_RECT, I_ARROW, PAD_BUTTON_BACK, 90);
|
||||
|
@ -73,9 +73,9 @@ void LayoutGamepad(int w, int h)
|
|||
|
||||
crossPad.setPos(leftX + arrow_spacing, leftY, 40, controlScale);
|
||||
|
||||
if (g_Config.iFpsLimit)
|
||||
buttonVPS.setPos(halfW - button_spacing * 2, h - 20 * controlScale, controlScale);
|
||||
else
|
||||
//if (g_Config.iFpsLimit)
|
||||
// buttonVPS.setPos(halfW - button_spacing * 2, h - 20 * controlScale, controlScale);
|
||||
//else
|
||||
buttonTurbo.setPos(halfW - button_spacing * 2, h - 20 * controlScale, controlScale);
|
||||
buttonSelect.setPos(halfW , h - 20 * controlScale, controlScale);
|
||||
buttonStart.setPos(halfW + button_spacing * 2 , h - 20 * controlScale, controlScale);
|
||||
|
@ -106,9 +106,9 @@ void UpdateGamepad(InputState &input_state)
|
|||
buttonLShoulder.update(input_state);
|
||||
buttonRShoulder.update(input_state);
|
||||
|
||||
if (g_Config.iFpsLimit)
|
||||
buttonVPS.update(input_state);
|
||||
else
|
||||
//if (g_Config.iFpsLimit)
|
||||
// buttonVPS.update(input_state);
|
||||
//else
|
||||
buttonTurbo.update(input_state);
|
||||
|
||||
#if USE_PAUSE_BUTTON
|
||||
|
@ -136,9 +136,9 @@ void DrawGamepad(DrawBuffer &db, float opacity)
|
|||
buttonLShoulder.draw(db, color, colorOverlay);
|
||||
buttonRShoulder.draw(db, color, colorOverlay);
|
||||
|
||||
if (g_Config.iFpsLimit)
|
||||
buttonVPS.draw(db, color, colorOverlay);
|
||||
else
|
||||
//if (g_Config.iFpsLimit)
|
||||
// buttonVPS.draw(db, color, colorOverlay);
|
||||
//else
|
||||
buttonTurbo.draw(db, color, colorOverlay);
|
||||
|
||||
#if USE_PAUSE_BUTTON
|
||||
|
|
Loading…
Add table
Reference in a new issue