mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-19 09:19:05 +02:00
Implement parts of the new input system for Blackberry and Qt. Touchscreen now works again.
This commit is contained in:
1 parent
7d1b604bf8
commit
79990fe01d
3 files changed
+31
-1
No files matched your search
@@ -421,6 +421,22 @@ void NativeUpdate(InputState &input)
|
||||
screenManager->update(input);
|
||||
}
|
||||
|
||||
void NativeTouch(const TouchInput &touch) {
|
||||
if (screenManager)
|
||||
screenManager->touch(touch);
|
||||
}
|
||||
|
||||
void NativeKey(const KeyInput &key) {
|
||||
g_buttonTracker.Process(key);
|
||||
if (screenManager)
|
||||
screenManager->key(key);
|
||||
}
|
||||
|
||||
void NativeAxis(const AxisInput &key) {
|
||||
if (screenManager)
|
||||
screenManager->axis(key);
|
||||
}
|
||||
|
||||
void NativeShutdownGraphics()
|
||||
{
|
||||
delete uiTexture;
|
||||
|
||||
@@ -38,12 +38,26 @@ void QtEmuGL::mouseDoubleClickEvent(QMouseEvent *)
|
||||
|
||||
void QtEmuGL::mousePressEvent(QMouseEvent *e)
|
||||
{
|
||||
TouchInput input;
|
||||
input_state->pointer_down[0] = true;
|
||||
input_state->pointer_x[0] = e->x();
|
||||
input_state->pointer_y[0] = e->y();
|
||||
|
||||
input.x = e->x();
|
||||
input.y = e->y();
|
||||
input.flags = TOUCH_DOWN;
|
||||
input.id = 0;
|
||||
NativeTouch(input);
|
||||
}
|
||||
|
||||
void QtEmuGL::mouseReleaseEvent(QMouseEvent *e)
|
||||
{
|
||||
TouchInput input;
|
||||
input_state->pointer_down[0] = false;
|
||||
|
||||
input.x = e->x();
|
||||
input.y = e->y();
|
||||
input.flags = TOUCH_UP;
|
||||
input.id = 0;
|
||||
NativeTouch(input);
|
||||
}
|
||||
+1
-1
Submodule native updated: b7c8b8ddef...4871c1192d.
Reference in new issue
Block a user