Skip to content

Instantly share code, notes, and snippets.

View InfoTeddy's full-sized avatar

Misa Elizabeth Kai InfoTeddy

View GitHub Profile
@InfoTeddy
InfoTeddy / fix_steam_screensaver.c
Created May 22, 2022 06:58
Linux Steam client screensaver issue workaround LD_PRELOAD library, while letting games disable screensaver
/* SPDX-License-Identifier: MIT */
/*
* On Linux, Steam periodically calls SDL_DisableScreenSaver() so your
* screensaver doesn't work with the Steam client open even if you aren't
* playing a game, as described in
* https://github.com/ValveSoftware/steam-for-linux/issues/5607 .
*
* To fix this, LD_PRELOAD a library that replaces SDL_DisableScreenSaver()
* with a no-op if the executable calling it is Steam, but otherwise let it