mirror of
https://github.com/Retropex/dolphin.git
synced 2025-05-12 19:30:44 +02:00
attempt #2
This commit is contained in:
parent
338e928ea5
commit
93c7aeee4e
@ -66,9 +66,8 @@ RenderWidget::RenderWidget(QWidget* parent) : QWidget(parent)
|
||||
connect(Host::GetInstance(), &Host::UpdateAndRecenterCursor, this, [this](bool locked) {
|
||||
if (locked) {
|
||||
QRect render_rect = geometry();
|
||||
cursor().setPos(windowHandle()->screen(),
|
||||
render_rect.left() + render_rect.width() / 2,
|
||||
render_rect.top() + render_rect.height() / 2);
|
||||
QPoint center = mapToGlobal(QPoint(render_rect.width() / 2, render_rect.height() / 2));
|
||||
cursor().setPos(windowHandle()->screen(), center);
|
||||
}
|
||||
setCursor((locked && Settings::Instance().GetCursorVisibility() == SConfig::ShowCursor::Never) ? Qt::BlankCursor :
|
||||
Qt::ArrowCursor);
|
||||
|
Loading…
Reference in New Issue
Block a user