Fix lakka settings

This commit is contained in:
Jean-André Santoni 2017-05-03 17:01:37 +02:00
parent a2d4a9efc5
commit c34b4dd787
2 changed files with 9 additions and 9 deletions

View File

@ -2199,9 +2199,9 @@ static bool config_load_file(const char *path, bool set_defaults,
}
#ifdef HAVE_LAKKA
settings->ssh_enable = path_file_exists(LAKKA_SSH_PATH);
settings->samba_enable = path_file_exists(LAKKA_SAMBA_PATH);
settings->bluetooth_enable = path_file_exists(LAKKA_BLUETOOTH_PATH);
settings->bools.ssh_enable = path_file_exists(LAKKA_SSH_PATH);
settings->bools.samba_enable = path_file_exists(LAKKA_SAMBA_PATH);
settings->bools.bluetooth_enable = path_file_exists(LAKKA_BLUETOOTH_PATH);
#endif
if (!retroarch_override_setting_is_set(RARCH_OVERRIDE_SETTING_SAVE_PATH, NULL) &&
@ -3158,15 +3158,15 @@ bool config_save_file(const char *path)
video_driver_save_settings(conf);
#ifdef HAVE_LAKKA
if (settings->ssh_enable)
if (settings->bools.ssh_enable)
fclose(fopen(LAKKA_SSH_PATH, "w"));
else
remove(LAKKA_SSH_PATH);
if (settings->samba_enable)
if (settings->bools.samba_enable)
fclose(fopen(LAKKA_SAMBA_PATH, "w"));
else
remove(LAKKA_SAMBA_PATH);
if (settings->bluetooth_enable)
if (settings->bools.bluetooth_enable)
fclose(fopen(LAKKA_BLUETOOTH_PATH, "w"));
else
remove(LAKKA_BLUETOOTH_PATH);

View File

@ -1791,7 +1791,7 @@ static void ssh_enable_toggle_change_handler(void *data)
{
bool enable = false;
settings_t *settings = config_get_ptr();
if (settings && settings->ssh_enable)
if (settings && settings->bools.ssh_enable)
enable = true;
systemd_service_toggle(LAKKA_SSH_PATH, (char*)"sshd.service",
@ -1802,7 +1802,7 @@ static void samba_enable_toggle_change_handler(void *data)
{
bool enable = false;
settings_t *settings = config_get_ptr();
if (settings && settings->samba_enable)
if (settings && settings->bools.samba_enable)
enable = true;
systemd_service_toggle(LAKKA_SAMBA_PATH, (char*)"smbd.service",
@ -1813,7 +1813,7 @@ static void bluetooth_enable_toggle_change_handler(void *data)
{
bool enable = false;
settings_t *settings = config_get_ptr();
if (settings && settings->bluetooth_enable)
if (settings && settings->bools.bluetooth_enable)
enable = true;
systemd_service_toggle(LAKKA_BLUETOOTH_PATH, (char*)"bluetooth.service",