mirror of
https://github.com/citra-emu/citra-nightly.git
synced 2025-03-01 14:57:56 +00:00
* citra_qt: correct spelling in configuration * citra_qt/camera: Changed the order of the translation The translation may not correspond to "couln't load" and "the camera", so create two cases which can get translated individually. Also add a space after "the camera". * citra_qt/camera: use the same syntax for the filter in "still_image_camera.cpp" as in "configure_camera.cpp" * citra_qt/camera: the config should only get added if it's not empty
25 lines
813 B
C++
25 lines
813 B
C++
// Copyright 2018 Citra Emulator Project
|
|
// Licensed under GPLv2 or any later version
|
|
// Refer to the license.txt file included.
|
|
|
|
#include <QMessageBox>
|
|
#include "citra_qt/camera/qt_camera_factory.h"
|
|
|
|
namespace Camera {
|
|
|
|
std::unique_ptr<CameraInterface> QtCameraFactory::CreatePreview(const std::string& config,
|
|
int width, int height) const {
|
|
std::unique_ptr<CameraInterface> camera = Create(config);
|
|
|
|
if (camera->IsPreviewAvailable()) {
|
|
return camera;
|
|
}
|
|
QMessageBox::critical(
|
|
nullptr, QObject::tr("Error"),
|
|
(config.empty() ? QObject::tr("Couldn't load the camera")
|
|
: QObject::tr("Couldn't load %1").arg(QString::fromStdString(config))));
|
|
return nullptr;
|
|
}
|
|
|
|
} // namespace Camera
|