Set up inhibit_screensaver config option to disable the feature

This commit is contained in:
Marc Di Luzio
2019-02-03 15:45:11 +00:00
parent 6a7aa1e307
commit ba49055519
4 changed files with 28 additions and 2 deletions

View File

@@ -198,7 +198,8 @@ static void game_mode_context_enter(GameModeContext *self)
}
/* Inhibit the screensaver */
game_mode_inhibit_screensaver(true);
if (config_get_inhibit_screensaver(self->config))
game_mode_inhibit_screensaver(true);
}
/**
@@ -213,7 +214,8 @@ static void game_mode_context_leave(GameModeContext *self)
sd_notifyf(0, "STATUS=%sGameMode is currently deactivated.%s\n", "\x1B[1;36m", "\x1B[0m");
/* UnInhibit the screensaver */
game_mode_inhibit_screensaver(false);
if (config_get_inhibit_screensaver(self->config))
game_mode_inhibit_screensaver(false);
/* Reset the governer state back to initial */
if (self->initial_cpu_mode[0] != '\0') {