1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-24 11:43:05 +01:00

Qt: show warning if ps move tracking is not supported

This commit is contained in:
Megamouse 2024-11-16 10:30:40 +01:00
parent 05096854bc
commit b89f7515fd
2 changed files with 15 additions and 0 deletions

View File

@ -1,5 +1,11 @@
#pragma once
#ifdef HAVE_OPENCV
constexpr bool g_ps_move_tracking_supported = true;
#else
constexpr bool g_ps_move_tracking_supported = false;
#endif
struct ps_move_info
{
bool valid = false;

View File

@ -13,6 +13,7 @@
#include <QPainter>
#include <QPushButton>
#include <QSlider>
#include <QMessageBox>
LOG_CHANNEL(ps_move);
@ -241,6 +242,14 @@ ps_move_tracker_dialog::ps_move_tracker_dialog(QWidget* parent)
update_saturation_threshold(true);
update_min_radius(true);
update_max_radius(true);
if constexpr (!g_ps_move_tracking_supported)
{
QTimer::singleShot(1000, this, [this]()
{
QMessageBox::warning(this, QObject::tr("Tracking not supported!"), QObject::tr("The PS Move tracking is not yet supported on this operating system."));
});
}
}
ps_move_tracker_dialog::~ps_move_tracker_dialog()