mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-07-27 00:00:07 -06:00
Base for controller touch screen input
* Supports analog stick, touchpad and gryo as input sources * Relative and absolute input for sticks and touchpad Still needs work before ready to merge, UI is not hooked up yet, cursor drawing is a hack and doesn't work with OpenGL and the input code needs some refining.
This commit is contained in:
@ -469,6 +469,12 @@ void EmuThread::run()
|
||||
OSD::AddMessage(0, lid ? "Lid closed" : "Lid opened");
|
||||
}
|
||||
|
||||
if (Input::JoyTouching)
|
||||
NDS::TouchScreen(Input::JoyTouchX, Input::JoyTouchY);
|
||||
|
||||
if (Input::JoyTouchReleased)
|
||||
NDS::ReleaseScreen();
|
||||
|
||||
// microphone input
|
||||
AudioInOut::MicProcess();
|
||||
|
||||
@ -1063,6 +1069,15 @@ void ScreenPanelNative::paintEvent(QPaintEvent* event)
|
||||
{
|
||||
painter.setTransform(screenTrans[i]);
|
||||
painter.drawImage(screenrc, screen[screenKind[i]]);
|
||||
|
||||
if (i == 1)
|
||||
{
|
||||
//QTransform cursorTrans = screenTrans[i].translate(Input::JoyTouchX, Input::JoyTouchY);
|
||||
//painter.setTransform(cursorTrans);
|
||||
QRect cursorRect = QRect(Input::JoyTouchX - 3, Input::JoyTouchY - 3, 5, 5);
|
||||
painter.setPen(QColor::fromRgb(255, 0, 0));
|
||||
painter.drawRoundedRect(cursorRect, 5, 5);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user