Merge branch 'master' into feature/savestates-2
This commit is contained in:
commit
828f88d20a
76 changed files with 3507 additions and 1369 deletions
|
@ -104,8 +104,8 @@ void EmuThread::run() {
|
|||
}
|
||||
|
||||
OpenGLWindow::OpenGLWindow(QWindow* parent, QWidget* event_handler, QOpenGLContext* shared_context)
|
||||
: QWindow(parent), event_handler(event_handler),
|
||||
context(new QOpenGLContext(shared_context->parent())) {
|
||||
: QWindow(parent), context(new QOpenGLContext(shared_context->parent())),
|
||||
event_handler(event_handler) {
|
||||
|
||||
// disable vsync for any shared contexts
|
||||
auto format = shared_context->format();
|
||||
|
@ -201,6 +201,8 @@ GRenderWindow::GRenderWindow(QWidget* parent_, EmuThread* emu_thread)
|
|||
setLayout(layout);
|
||||
InputCommon::Init();
|
||||
|
||||
this->setMouseTracking(true);
|
||||
|
||||
GMainWindow* parent = GetMainWindow();
|
||||
connect(this, &GRenderWindow::FirstFrameDisplayed, parent, &GMainWindow::OnLoadComplete);
|
||||
}
|
||||
|
@ -297,6 +299,7 @@ void GRenderWindow::mousePressEvent(QMouseEvent* event) {
|
|||
} else if (event->button() == Qt::RightButton) {
|
||||
InputCommon::GetMotionEmu()->BeginTilt(pos.x(), pos.y());
|
||||
}
|
||||
QWidget::mouseMoveEvent(event);
|
||||
}
|
||||
|
||||
void GRenderWindow::mouseMoveEvent(QMouseEvent* event) {
|
||||
|
@ -307,6 +310,7 @@ void GRenderWindow::mouseMoveEvent(QMouseEvent* event) {
|
|||
const auto [x, y] = ScaleTouch(pos);
|
||||
this->TouchMoved(x, y);
|
||||
InputCommon::GetMotionEmu()->Tilt(pos.x(), pos.y());
|
||||
QWidget::mouseMoveEvent(event);
|
||||
}
|
||||
|
||||
void GRenderWindow::mouseReleaseEvent(QMouseEvent* event) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue