mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 14:49:42 -06:00
RenderWidget: hide cursor
This commit is contained in:
@ -6,6 +6,7 @@
|
|||||||
|
|
||||||
#include "DolphinQt2/Host.h"
|
#include "DolphinQt2/Host.h"
|
||||||
#include "DolphinQt2/RenderWidget.h"
|
#include "DolphinQt2/RenderWidget.h"
|
||||||
|
#include "DolphinQt2/Settings.h"
|
||||||
|
|
||||||
RenderWidget::RenderWidget(QWidget* parent) : QWidget(parent)
|
RenderWidget::RenderWidget(QWidget* parent) : QWidget(parent)
|
||||||
{
|
{
|
||||||
@ -17,6 +18,15 @@ RenderWidget::RenderWidget(QWidget* parent) : QWidget(parent)
|
|||||||
connect(this, &RenderWidget::StateChanged, Host::GetInstance(), &Host::SetRenderFullscreen);
|
connect(this, &RenderWidget::StateChanged, Host::GetInstance(), &Host::SetRenderFullscreen);
|
||||||
connect(this, &RenderWidget::HandleChanged, Host::GetInstance(), &Host::SetRenderHandle);
|
connect(this, &RenderWidget::HandleChanged, Host::GetInstance(), &Host::SetRenderHandle);
|
||||||
emit HandleChanged((void*)winId());
|
emit HandleChanged((void*)winId());
|
||||||
|
|
||||||
|
connect(&Settings::Instance(), &Settings::HideCursorChanged, this,
|
||||||
|
&RenderWidget::OnHideCursorChanged);
|
||||||
|
OnHideCursorChanged();
|
||||||
|
}
|
||||||
|
|
||||||
|
void RenderWidget::OnHideCursorChanged()
|
||||||
|
{
|
||||||
|
setCursor(Settings::Instance().GetHideCursor() ? Qt::BlankCursor : Qt::ArrowCursor);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool RenderWidget::event(QEvent* event)
|
bool RenderWidget::event(QEvent* event)
|
||||||
|
@ -22,4 +22,7 @@ signals:
|
|||||||
void HandleChanged(void* handle);
|
void HandleChanged(void* handle);
|
||||||
void FocusChanged(bool focus);
|
void FocusChanged(bool focus);
|
||||||
void StateChanged(bool fullscreen);
|
void StateChanged(bool fullscreen);
|
||||||
|
|
||||||
|
private:
|
||||||
|
void OnHideCursorChanged();
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user