mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-15 13:57:57 -07:00
de632fc9c8
We now differentiate between a resize event and surface change/destroyed event, reducing the overhead for resizes in the Vulkan backend. It is also now now safe to change the surface multiple times if the video thread is lagging behind.
35 lines
655 B
C++
35 lines
655 B
C++
// Copyright 2015 Dolphin Emulator Project
|
|
// Licensed under GPLv2+
|
|
// Refer to the license.txt file included.
|
|
|
|
#pragma once
|
|
|
|
#include <QEvent>
|
|
#include <QWidget>
|
|
|
|
class QTimer;
|
|
|
|
class RenderWidget final : public QWidget
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit RenderWidget(QWidget* parent = nullptr);
|
|
|
|
bool event(QEvent* event) override;
|
|
|
|
signals:
|
|
void EscapePressed();
|
|
void Closed();
|
|
void HandleChanged(void* handle);
|
|
void StateChanged(bool fullscreen);
|
|
void SizeChanged(int new_width, int new_height);
|
|
|
|
private:
|
|
void HandleCursorTimer();
|
|
void OnHideCursorChanged();
|
|
|
|
static constexpr int MOUSE_HIDE_DELAY = 3000;
|
|
QTimer* m_mouse_timer;
|
|
};
|