mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2024-12-02 15:54:24 +01:00
ad3ee5c52b
Gating the IR Sensor code behind a macro like so `#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) && YUZU_USE_QT_MULTIMEDIA` The YUZU_USE_QT_MULTIMEDIA flag is implemented in later commit Also the locale fix in src/yuzu/main.cpp is now gated against Qt6, as it causes compilation error
57 lines
1.3 KiB
C++
57 lines
1.3 KiB
C++
// Text : Copyright 2022 yuzu Emulator Project
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
#pragma once
|
|
|
|
#include <memory>
|
|
#include <QDialog>
|
|
|
|
class QTimer;
|
|
class QCamera;
|
|
class QCameraImageCapture;
|
|
|
|
namespace InputCommon {
|
|
class InputSubsystem;
|
|
} // namespace InputCommon
|
|
|
|
namespace Ui {
|
|
class ConfigureCamera;
|
|
}
|
|
|
|
class ConfigureCamera : public QDialog {
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit ConfigureCamera(QWidget* parent, InputCommon::InputSubsystem* input_subsystem_);
|
|
~ConfigureCamera() override;
|
|
|
|
void ApplyConfiguration();
|
|
|
|
private:
|
|
void changeEvent(QEvent* event) override;
|
|
void RetranslateUI();
|
|
|
|
/// Load configuration settings.
|
|
void LoadConfiguration();
|
|
|
|
/// Restore all buttons to their default values.
|
|
void RestoreDefaults();
|
|
|
|
void DisplayCapturedFrame(int requestId, const QImage& img);
|
|
|
|
/// Loads and signals the current selected camera to display a frame
|
|
void PreviewCamera();
|
|
|
|
InputCommon::InputSubsystem* input_subsystem;
|
|
|
|
bool is_virtual_camera;
|
|
int pending_snapshots;
|
|
#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) && YUZU_USE_QT_MULTIMEDIA
|
|
std::unique_ptr<QCamera> camera;
|
|
std::unique_ptr<QCameraImageCapture> camera_capture;
|
|
#endif
|
|
std::unique_ptr<QTimer> camera_timer;
|
|
std::vector<std::string> input_devices;
|
|
std::unique_ptr<Ui::ConfigureCamera> ui;
|
|
};
|