mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-20 01:38:12 +00:00
(Driver) - Only push camera/location driver disabled message if first condition
fails - Add further runtime check - checking if driver->start is bound
This commit is contained in:
parent
40f7e80745
commit
f106a1cfaa
@ -76,12 +76,12 @@ void find_next_camera_driver(void)
|
||||
|
||||
bool driver_camera_start(void)
|
||||
{
|
||||
if (driver.camera && driver.camera_data)
|
||||
if (driver.camera && driver.camera_data && driver.camera->start)
|
||||
{
|
||||
if (g_settings.camera.allow)
|
||||
return driver.camera->start(driver.camera_data);
|
||||
|
||||
msg_queue_push(g_extern.msg_queue, "Camera is explicitly disabled.\n", 1, 180);
|
||||
else
|
||||
msg_queue_push(g_extern.msg_queue, "Camera is explicitly disabled.\n", 1, 180);
|
||||
return false;
|
||||
}
|
||||
else
|
||||
|
@ -70,12 +70,12 @@ void find_next_location_driver(void)
|
||||
|
||||
bool driver_location_start(void)
|
||||
{
|
||||
if (driver.location && driver.location_data)
|
||||
if (driver.location && driver.location_data && driver.location->start)
|
||||
{
|
||||
if (g_settings.location.allow)
|
||||
return driver.location->start(driver.location_data);
|
||||
|
||||
msg_queue_push(g_extern.msg_queue, "Location is explicitly disabled.\n", 1, 180);
|
||||
else
|
||||
msg_queue_push(g_extern.msg_queue, "Location is explicitly disabled.\n", 1, 180);
|
||||
return false;
|
||||
}
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user