mirror of
https://github.com/azahar-emu/azahar.git
synced 2026-06-07 11:13:40 -04:00
updated TouchDirectlyPressed, fixed auto map, and cursor rotation
This commit is contained in:
parent
0ba8e18dc4
commit
9149f29c1a
5 changed files with 6 additions and 3 deletions
|
|
@ -33,6 +33,7 @@ const std::array<int, Settings::NativeButton::NumButtons> QtConfig::default_butt
|
|||
Qt::Key_A, Qt::Key_S, Qt::Key_Z, Qt::Key_X, Qt::Key_T, Qt::Key_G,
|
||||
Qt::Key_F, Qt::Key_H, Qt::Key_Q, Qt::Key_W, Qt::Key_M, Qt::Key_N,
|
||||
Qt::Key_O, Qt::Key_P, Qt::Key_1, Qt::Key_2, Qt::Key_B, Qt::Key_V,
|
||||
Qt::Key_U,
|
||||
};
|
||||
|
||||
const std::array<std::array<int, 5>, Settings::NativeAnalog::NumAnalogs> QtConfig::default_analogs{{
|
||||
|
|
|
|||
|
|
@ -244,7 +244,7 @@ void Cursor::runMacro(){
|
|||
|
||||
void Cursor::setRotation(){
|
||||
if (emuWindow->GetFramebufferLayout().is_portrait){
|
||||
rotation = 3;
|
||||
rotation = 1;
|
||||
} else {
|
||||
rotation = 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -198,8 +198,8 @@ bool EmuWindow::TouchDirectlyPressed(unsigned internal_x, unsigned internal_y) {
|
|||
std::clamp<unsigned>(internal_x, 0, 319);
|
||||
std::clamp<unsigned>(internal_y, 0, 239);
|
||||
touch_state->touch_pressed = true;
|
||||
touch_state->touch_x = internal_x/319.0f;
|
||||
touch_state->touch_y = (239-internal_y)/239.0f;
|
||||
touch_state->touch_x = internal_x/320.0f;
|
||||
touch_state->touch_y = (239-internal_y)/240.0f;
|
||||
return true;
|
||||
}
|
||||
void EmuWindow::TouchReleased() {
|
||||
|
|
|
|||
|
|
@ -639,6 +639,7 @@ FramebufferLayout reverseLayout(FramebufferLayout layout) {
|
|||
layout.additional_screen.top = layout.height - oldRight;
|
||||
layout.additional_screen.bottom = layout.height - oldLeft;
|
||||
}
|
||||
layout.is_portrait = true;
|
||||
return layout;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -140,6 +140,7 @@ constexpr std::array<SDL_GameControllerButton, Settings::NativeButton::NumButton
|
|||
SDL_CONTROLLER_BUTTON_INVALID,
|
||||
SDL_CONTROLLER_BUTTON_GUIDE,
|
||||
SDL_CONTROLLER_BUTTON_INVALID,
|
||||
SDL_CONTROLLER_BUTTON_LEFTSTICK,
|
||||
}};
|
||||
|
||||
struct SDLJoystickDeleter {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue