mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-05 14:31:24 +12:00
Qt: Tiny improvements to Cam/Mic permissions
This commit is contained in:
parent
c4282e63fb
commit
feedc183a4
3 changed files with 4 additions and 4 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue