From 40f7e8074556227fff3741f9be021b4092198976 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 26 May 2014 19:18:52 +0200 Subject: [PATCH] (Location/Camera) Let the user know when the camera/location functionality has been explicitly disabled in the frontend --- driver-contexts/camera_driver.c | 10 ++++++++-- driver-contexts/location_driver.c | 10 ++++++++-- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/driver-contexts/camera_driver.c b/driver-contexts/camera_driver.c index be4a88ce06..40911ef94f 100644 --- a/driver-contexts/camera_driver.c +++ b/driver-contexts/camera_driver.c @@ -76,8 +76,14 @@ void find_next_camera_driver(void) bool driver_camera_start(void) { - if (driver.camera && driver.camera_data && g_settings.camera.allow) - return driver.camera->start(driver.camera_data); + if (driver.camera && driver.camera_data) + { + 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); + return false; + } else return false; } diff --git a/driver-contexts/location_driver.c b/driver-contexts/location_driver.c index 7ecda009c6..47cb9eae70 100644 --- a/driver-contexts/location_driver.c +++ b/driver-contexts/location_driver.c @@ -70,8 +70,14 @@ void find_next_location_driver(void) bool driver_location_start(void) { - if (driver.location && driver.location_data && g_settings.location.allow) - return driver.location->start(driver.location_data); + if (driver.location && driver.location_data) + { + 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); + return false; + } else return false; }