mirror of
https://github.com/RPCS3/rpcs3.git
synced 2026-06-05 22:55:04 -06:00
Qt: Tiny improvements to Cam/Mic permissions
This commit is contained in:
parent
c4282e63fb
commit
feedc183a4
@ -231,7 +231,7 @@ void camera_settings_dialog::handle_settings_change(int index)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if QT_CONFIG(permissions)
|
#if QT_CONFIG(permissions)
|
||||||
QCameraPermission permission;
|
const QCameraPermission permission;
|
||||||
switch (qApp->checkPermission(permission))
|
switch (qApp->checkPermission(permission))
|
||||||
{
|
{
|
||||||
case Qt::PermissionStatus::Undetermined:
|
case Qt::PermissionStatus::Undetermined:
|
||||||
|
|||||||
@ -112,7 +112,7 @@ extern void check_microphone_permissions()
|
|||||||
#if QT_CONFIG(permissions)
|
#if QT_CONFIG(permissions)
|
||||||
Emu.BlockingCallFromMainThread([]()
|
Emu.BlockingCallFromMainThread([]()
|
||||||
{
|
{
|
||||||
QMicrophonePermission permission;
|
const QMicrophonePermission permission;
|
||||||
switch (qApp->checkPermission(permission))
|
switch (qApp->checkPermission(permission))
|
||||||
{
|
{
|
||||||
case Qt::PermissionStatus::Undetermined:
|
case Qt::PermissionStatus::Undetermined:
|
||||||
|
|||||||
@ -186,12 +186,12 @@ void qt_camera_handler::start_camera()
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if QT_CONFIG(permissions)
|
#if QT_CONFIG(permissions)
|
||||||
QCameraPermission permission;
|
const QCameraPermission permission;
|
||||||
switch (qApp->checkPermission(permission))
|
switch (qApp->checkPermission(permission))
|
||||||
{
|
{
|
||||||
case Qt::PermissionStatus::Undetermined:
|
case Qt::PermissionStatus::Undetermined:
|
||||||
camera_log.notice("Requesting camera permission");
|
camera_log.notice("Requesting camera permission");
|
||||||
qApp->requestPermission(permission, [this]()
|
qApp->requestPermission(permission, this, [this]()
|
||||||
{
|
{
|
||||||
start_camera();
|
start_camera();
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user