ui(QT): QT 6.7.3 Implementation

This commit is contained in:
vampiric_x 2025-01-12 04:26:22 +01:00
parent d3ed42af8f
commit 2d7f9d921b
10 changed files with 394 additions and 203 deletions

View file

@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2014 Citra Emulator Project & 2025 Citron Homebrew Project
// SPDX-FileCopyrightText: 2025 Citron Homebrew Emulator Project & vampiric_x 2025
// SPDX-License-Identifier: GPL-2.0-or-later
#include <algorithm>
@ -736,19 +736,19 @@ void GRenderWindow::wheelEvent(QWheelEvent* event) {
}
void GRenderWindow::TouchBeginEvent(const QTouchEvent* event) {
QList<QTouchEvent::TouchPoint> touch_points = event->touchPoints();
QList<QTouchEvent::TouchPoint> touch_points = event->points();
for (const auto& touch_point : touch_points) {
const auto [x, y] = ScaleTouch(touch_point.pos());
const auto [x, y] = ScaleTouch(touch_point.position());
const auto [touch_x, touch_y] = MapToTouchScreen(x, y);
input_subsystem->GetTouchScreen()->TouchPressed(touch_x, touch_y, touch_point.id());
}
}
void GRenderWindow::TouchUpdateEvent(const QTouchEvent* event) {
QList<QTouchEvent::TouchPoint> touch_points = event->touchPoints();
QList<QTouchEvent::TouchPoint> touch_points = event->points();
input_subsystem->GetTouchScreen()->ClearActiveFlag();
for (const auto& touch_point : touch_points) {
const auto [x, y] = ScaleTouch(touch_point.pos());
const auto [x, y] = ScaleTouch(touch_point.position());
const auto [touch_x, touch_y] = MapToTouchScreen(x, y);
input_subsystem->GetTouchScreen()->TouchMoved(touch_x, touch_y, touch_point.id());
}
@ -1137,4 +1137,4 @@ bool GRenderWindow::eventFilter(QObject* object, QEvent* event) {
emit MouseActivity();
}
return false;
}
}