Skip to content

Commit fdc8625

Browse files
authored
webOS: allow user to decide about the screensaver (libretro#18564)
1 parent a8d0ad0 commit fdc8625

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

input/common/wayland_common_webos.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -702,6 +702,9 @@ static bool screenSaverCallback(LSHandle* sh, LSMessage* reply, void* context)
702702
if (strcmp(state, "Active") != 0)
703703
return true;
704704

705+
settings_t *settings = config_get_ptr();
706+
bool suspend_screensaver = settings->bools.ui_suspend_screensaver_enable;
707+
705708
rjsonwriter_t *w = rjsonwriter_open_memory();
706709
rjsonwriter_raw(w, "{", 1);
707710
rjsonwriter_add_string(w, "clientName");
@@ -710,7 +713,7 @@ static bool screenSaverCallback(LSHandle* sh, LSMessage* reply, void* context)
710713
rjsonwriter_raw(w, ",", 1);
711714
rjsonwriter_add_string(w, "ack");
712715
rjsonwriter_raw(w, ":", 1);
713-
rjsonwriter_rawf(w, "%s", "false");
716+
rjsonwriter_rawf(w, "%s", suspend_screensaver ? "false" : "true");
714717
rjsonwriter_raw(w, ",", 1);
715718
rjsonwriter_add_string(w, "timestamp");
716719
rjsonwriter_raw(w, ":", 1);

0 commit comments

Comments
 (0)