Apple: request authorization for camera usage
This commit is contained in:
parent
e6e6f4fbe1
commit
940ec70f13
6 changed files with 116 additions and 2 deletions
|
@ -9,6 +9,7 @@
|
|||
#include <QThread>
|
||||
#include "citra_qt/camera/qt_multimedia_camera.h"
|
||||
#include "citra_qt/main.h"
|
||||
#include "citra_qt/usage_authorization.h"
|
||||
|
||||
namespace Camera {
|
||||
|
||||
|
@ -187,6 +188,13 @@ void QtMultimediaCameraHandler::StopCamera() {
|
|||
}
|
||||
|
||||
void QtMultimediaCameraHandler::StartCamera() {
|
||||
#if defined(__APPLE__)
|
||||
bool authorized = AppleAuthorization::CheckAuthorizationForCamera();
|
||||
if (!authorized) {
|
||||
LOG_ERROR(Service_CAM, "Unable to start camera due to lack of authorization");
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
camera->setViewfinderSettings(settings);
|
||||
camera->start();
|
||||
started = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue