|
|
@ -820,6 +820,7 @@ void GRenderWindow::RequestCameraCapture() { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void GRenderWindow::OnCameraCapture(int requestId, const QImage& img) { |
|
|
void GRenderWindow::OnCameraCapture(int requestId, const QImage& img) { |
|
|
|
|
|
#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) && YUZU_USE_QT_MULTIMEDIA
|
|
|
// TODO: Capture directly in the format and resolution needed
|
|
|
// TODO: Capture directly in the format and resolution needed
|
|
|
const auto converted = |
|
|
const auto converted = |
|
|
img.scaled(CAMERA_WIDTH, CAMERA_HEIGHT, Qt::AspectRatioMode::IgnoreAspectRatio, |
|
|
img.scaled(CAMERA_WIDTH, CAMERA_HEIGHT, Qt::AspectRatioMode::IgnoreAspectRatio, |
|
|
@ -828,6 +829,7 @@ void GRenderWindow::OnCameraCapture(int requestId, const QImage& img) { |
|
|
std::memcpy(camera_data.data(), converted.bits(), CAMERA_WIDTH * CAMERA_HEIGHT * sizeof(u32)); |
|
|
std::memcpy(camera_data.data(), converted.bits(), CAMERA_WIDTH * CAMERA_HEIGHT * sizeof(u32)); |
|
|
input_subsystem->GetCamera()->SetCameraData(CAMERA_WIDTH, CAMERA_HEIGHT, camera_data); |
|
|
input_subsystem->GetCamera()->SetCameraData(CAMERA_WIDTH, CAMERA_HEIGHT, camera_data); |
|
|
pending_camera_snapshots = 0; |
|
|
pending_camera_snapshots = 0; |
|
|
|
|
|
#endif
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
bool GRenderWindow::event(QEvent* event) { |
|
|
bool GRenderWindow::event(QEvent* event) { |
|
|
|