mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-04 22:11:26 +12:00
Used to access get_mouse_lock_state rather than going through the QWindow property tables. Modify mouse hide and lock to default OFF when entering Windowed mode, and to default ON when entering Fullscreen unless 'show cursor in fullscreen' is configured
29 lines
666 B
C++
29 lines
666 B
C++
#pragma once
|
|
|
|
#include "stdafx.h"
|
|
#include "Emu/Io/MouseHandler.h"
|
|
#include "rpcs3qt/gs_frame.h"
|
|
|
|
#include <QWindow>
|
|
#include <QMouseEvent>
|
|
#include <QWheelEvent>
|
|
|
|
class basic_mouse_handler final : public QObject, public MouseHandlerBase
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
virtual void Init(const u32 max_connect) override;
|
|
|
|
basic_mouse_handler();
|
|
|
|
void SetTargetWindow(QWindow* target);
|
|
void MouseButtonDown(QMouseEvent* event);
|
|
void MouseButtonUp(QMouseEvent* event);
|
|
void MouseScroll(QWheelEvent* event);
|
|
void MouseMove(QMouseEvent* event);
|
|
|
|
bool eventFilter(QObject* obj, QEvent* ev) override;
|
|
private:
|
|
QWindow* m_target = nullptr;
|
|
bool get_mouse_lock_state();
|
|
};
|