mirror of
https://github.com/citra-emu/citra.git
synced 2024-12-20 14:10:12 +00:00
Merge pull request #4242 from citra-valentin/fix-camera-on-linux-pr
Fix camera on Linux
This commit is contained in:
commit
3480c1d49d
@ -174,6 +174,12 @@ void QtMultimediaCameraHandler::CreateCamera(const std::string& camera_name) {
|
|||||||
settings.setMaximumFrameRate(30);
|
settings.setMaximumFrameRate(30);
|
||||||
camera->setViewfinder(&camera_surface);
|
camera->setViewfinder(&camera_surface);
|
||||||
camera->load();
|
camera->load();
|
||||||
|
if (camera->supportedViewfinderPixelFormats().isEmpty()) {
|
||||||
|
// The gstreamer plugin (used on linux systems) returns an empty list on querying supported
|
||||||
|
// viewfinder pixel formats, and will not work without expliciting setting it to some value,
|
||||||
|
// so we are defaulting to RGB565 here which should be fairly widely supported.
|
||||||
|
settings.setPixelFormat(QVideoFrame::PixelFormat::Format_RGB565);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void QtMultimediaCameraHandler::StopCamera() {
|
void QtMultimediaCameraHandler::StopCamera() {
|
||||||
|
Loading…
Reference in New Issue
Block a user