mirror of
https://git.citron-emu.org/citron/emulator
synced 2025-12-19 10:43:33 +00:00
refactor: Exit Fullscreen & Mouse Panning Hotkeys to GRenderWindow
Signed-off-by: Collecting <collecting@noreply.localhost>
This commit is contained in:
@@ -30,8 +30,10 @@
|
|||||||
#include "common/polyfill_thread.h"
|
#include "common/polyfill_thread.h"
|
||||||
#include "common/thread.h"
|
#include "common/thread.h"
|
||||||
#include "core/frontend/emu_window.h"
|
#include "core/frontend/emu_window.h"
|
||||||
|
#include "citron/hotkeys.h"
|
||||||
|
|
||||||
class GMainWindow;
|
class GMainWindow;
|
||||||
|
class HotkeyRegistry;
|
||||||
class QCamera;
|
class QCamera;
|
||||||
class QCameraImageCapture;
|
class QCameraImageCapture;
|
||||||
class QCloseEvent;
|
class QCloseEvent;
|
||||||
@@ -150,7 +152,7 @@ class GRenderWindow : public QWidget, public Core::Frontend::EmuWindow {
|
|||||||
public:
|
public:
|
||||||
explicit GRenderWindow(GMainWindow* parent, EmuThread* emu_thread_,
|
explicit GRenderWindow(GMainWindow* parent, EmuThread* emu_thread_,
|
||||||
std::shared_ptr<InputCommon::InputSubsystem> input_subsystem_,
|
std::shared_ptr<InputCommon::InputSubsystem> input_subsystem_,
|
||||||
Core::System& system_);
|
Core::System& system_, HotkeyRegistry& hotkey_registry_);
|
||||||
~GRenderWindow() override;
|
~GRenderWindow() override;
|
||||||
|
|
||||||
// EmuWindow implementation.
|
// EmuWindow implementation.
|
||||||
@@ -197,6 +199,7 @@ public:
|
|||||||
void focusOutEvent(QFocusEvent* event) override;
|
void focusOutEvent(QFocusEvent* event) override;
|
||||||
|
|
||||||
bool InitRenderTarget();
|
bool InitRenderTarget();
|
||||||
|
void SetMousePanningState(bool enabled); // <<< ADDED
|
||||||
|
|
||||||
/// Destroy the previous run's child_widget which should also destroy the child_window
|
/// Destroy the previous run's child_widget which should also destroy the child_window
|
||||||
void ReleaseRenderTarget();
|
void ReleaseRenderTarget();
|
||||||
@@ -227,6 +230,8 @@ signals:
|
|||||||
void ExitSignal();
|
void ExitSignal();
|
||||||
void MouseActivity();
|
void MouseActivity();
|
||||||
void TasPlaybackStateChanged();
|
void TasPlaybackStateChanged();
|
||||||
|
void PanningToggleHotkeyPressed();
|
||||||
|
void FullscreenExitHotkeyPressed();
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void HideMouseCursor();
|
void HideMouseCursor();
|
||||||
@@ -265,6 +270,7 @@ private:
|
|||||||
|
|
||||||
bool first_frame = false;
|
bool first_frame = false;
|
||||||
InputCommon::TasInput::TasState last_tas_state;
|
InputCommon::TasInput::TasState last_tas_state;
|
||||||
|
bool strict_context_required;
|
||||||
|
|
||||||
#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) && CITRON_USE_QT_MULTIMEDIA
|
#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) && CITRON_USE_QT_MULTIMEDIA
|
||||||
bool is_virtual_camera;
|
bool is_virtual_camera;
|
||||||
@@ -279,6 +285,7 @@ private:
|
|||||||
QTimer mouse_hide_timer;
|
QTimer mouse_hide_timer;
|
||||||
|
|
||||||
Core::System& system;
|
Core::System& system;
|
||||||
|
HotkeyRegistry& hotkey_registry;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void showEvent(QShowEvent* event) override;
|
void showEvent(QShowEvent* event) override;
|
||||||
|
|||||||
Reference in New Issue
Block a user