From 80604a752bae97700feee26e2faf59162a4f2aa4 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Sat, 27 Nov 2021 17:28:01 +0300 Subject: [PATCH] Set SDL_HINT_APP_NAME for SDL 2.0.18 --- app/main.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/main.cpp b/app/main.cpp index a110e81c..35696df6 100644 --- a/app/main.cpp +++ b/app/main.cpp @@ -442,9 +442,11 @@ int main(int argc, char *argv[]) // the mouse motion exactly how it was given to us. SDL_SetHint("SDL_MOUSE_RELATIVE_SCALING", "0"); - // Set our app name for SDL to use with PulseAudio. This matches what we provide - // as our app name to libsoundio too. + // Set our app name for SDL to use with PulseAudio and PipeWire. This matches what we + // provide as our app name to libsoundio too. On SDL 2.0.18+, SDL_APP_NAME is also used + // for screensaver inhibitor reporting. SDL_SetHint("SDL_AUDIO_DEVICE_APP_NAME", "Moonlight"); + SDL_SetHint("SDL_APP_NAME", "Moonlight"); #ifdef QT_DEBUG // Allow thread naming using exceptions on debug builds. SDL doesn't use SEH