RenderWidget: Remove mouse based Free Look since it has moved to the HotkeyScheduler
This commit is contained in:
parent
602cb39101
commit
679d51c289
|
@ -32,9 +32,7 @@
|
||||||
#include "DolphinQt/Resources.h"
|
#include "DolphinQt/Resources.h"
|
||||||
#include "DolphinQt/Settings.h"
|
#include "DolphinQt/Settings.h"
|
||||||
|
|
||||||
#include "VideoCommon/FreeLookCamera.h"
|
|
||||||
#include "VideoCommon/RenderBase.h"
|
#include "VideoCommon/RenderBase.h"
|
||||||
#include "VideoCommon/VertexShaderManager.h"
|
|
||||||
#include "VideoCommon/VideoConfig.h"
|
#include "VideoCommon/VideoConfig.h"
|
||||||
|
|
||||||
RenderWidget::RenderWidget(QWidget* parent) : QWidget(parent)
|
RenderWidget::RenderWidget(QWidget* parent) : QWidget(parent)
|
||||||
|
@ -180,11 +178,6 @@ bool RenderWidget::event(QEvent* event)
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case QEvent::MouseMove:
|
|
||||||
if (g_freelook_camera.IsActive())
|
|
||||||
OnFreeLookMouseMove(static_cast<QMouseEvent*>(event));
|
|
||||||
[[fallthrough]];
|
|
||||||
|
|
||||||
case QEvent::MouseButtonPress:
|
case QEvent::MouseButtonPress:
|
||||||
if (!Settings::Instance().GetHideCursor() && isActiveWindow())
|
if (!Settings::Instance().GetHideCursor() && isActiveWindow())
|
||||||
{
|
{
|
||||||
|
@ -237,23 +230,6 @@ bool RenderWidget::event(QEvent* event)
|
||||||
return QWidget::event(event);
|
return QWidget::event(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
void RenderWidget::OnFreeLookMouseMove(QMouseEvent* event)
|
|
||||||
{
|
|
||||||
const auto mouse_move = event->pos() - m_last_mouse;
|
|
||||||
m_last_mouse = event->pos();
|
|
||||||
|
|
||||||
if (event->buttons() & Qt::RightButton)
|
|
||||||
{
|
|
||||||
// Camera Pitch and Yaw:
|
|
||||||
g_freelook_camera.Rotate(Common::Vec3{mouse_move.y() / 200.f, mouse_move.x() / 200.f, 0.f});
|
|
||||||
}
|
|
||||||
else if (event->buttons() & Qt::MiddleButton)
|
|
||||||
{
|
|
||||||
// Camera Roll:
|
|
||||||
g_freelook_camera.Rotate({0.f, 0.f, mouse_move.x() / 200.f});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void RenderWidget::PassEventToImGui(const QEvent* event)
|
void RenderWidget::PassEventToImGui(const QEvent* event)
|
||||||
{
|
{
|
||||||
if (!Core::IsRunningAndStarted())
|
if (!Core::IsRunningAndStarted())
|
||||||
|
|
|
@ -33,7 +33,6 @@ private:
|
||||||
void HandleCursorTimer();
|
void HandleCursorTimer();
|
||||||
void OnHideCursorChanged();
|
void OnHideCursorChanged();
|
||||||
void OnKeepOnTopChanged(bool top);
|
void OnKeepOnTopChanged(bool top);
|
||||||
void OnFreeLookMouseMove(QMouseEvent* event);
|
|
||||||
void PassEventToImGui(const QEvent* event);
|
void PassEventToImGui(const QEvent* event);
|
||||||
void SetImGuiKeyMap();
|
void SetImGuiKeyMap();
|
||||||
void dragEnterEvent(QDragEnterEvent* event) override;
|
void dragEnterEvent(QDragEnterEvent* event) override;
|
||||||
|
|
Loading…
Reference in New Issue