mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-07-11 01:25:07 +02:00
Qt: Don't forget the mouse flags
This commit is contained in:
@@ -138,7 +138,7 @@ enum {
|
||||
TOUCH_RELEASE_ALL = 1 << 6, // Useful for app focus switches when events may be lost.
|
||||
TOUCH_HOVER = 1 << 7,
|
||||
|
||||
// These are the Android getToolType() codes, shifted by 10.
|
||||
// These are the Android getToolType() codes, shifted by 10. Unused currently.
|
||||
TOUCH_TOOL_MASK = 7 << 10,
|
||||
TOUCH_TOOL_UNKNOWN = 0 << 10,
|
||||
TOUCH_TOOL_FINGER = 1 << 10,
|
||||
|
||||
+2
-2
@@ -613,7 +613,7 @@ bool MainUI::event(QEvent *e) {
|
||||
case Qt::LeftButton:
|
||||
input.x = ((QMouseEvent*)e)->pos().x() * g_display.dpi_scale * xscale;
|
||||
input.y = ((QMouseEvent*)e)->pos().y() * g_display.dpi_scale * yscale;
|
||||
input.flags = (e->type() == QEvent::MouseButtonPress) ? TOUCH_DOWN : TOUCH_UP;
|
||||
input.flags = ((e->type() == QEvent::MouseButtonPress) ? TOUCH_DOWN : TOUCH_UP) | TOUCH_MOUSE;
|
||||
input.id = 0;
|
||||
NativeTouch(input);
|
||||
break;
|
||||
@@ -636,7 +636,7 @@ bool MainUI::event(QEvent *e) {
|
||||
case QEvent::MouseMove:
|
||||
input.x = ((QMouseEvent*)e)->pos().x() * g_display.dpi_scale * xscale;
|
||||
input.y = ((QMouseEvent*)e)->pos().y() * g_display.dpi_scale * yscale;
|
||||
input.flags = TOUCH_MOVE;
|
||||
input.flags = TOUCH_MOVE | TOUCH_MOUSE;
|
||||
input.id = 0;
|
||||
NativeTouch(input);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user