mirror of
https://github.com/encounter/SDL.git
synced 2025-12-09 21:47:44 +00:00
Add SDL_HINT_APP_NAME and DBUS inhibition hint
See SDL bug #4703. This implements two new hints: - SDL_APP_NAME - SDL_SCREENSAVER_INHIBIT_ACTIVITY_NAME The former is the successor to SDL_HINT_AUDIO_DEVICE_APP_NAME, and acts as a generic "application name" used both by audio drivers and DBUS screensaver inhibition. If SDL_AUDIO_DEVICE_APP_NAME is set, it will still take priority over SDL_APP_NAME. The second allows the "activity name" used by org.freedesktop.ScreenSavver's Inhibit method, which are often shown in the UI as the reason the screensaver (and/or suspend/other power-managment features) are disabled.
This commit is contained in:
committed by
Ryan C. Gordon
parent
9fae8f7088
commit
a1ffeda0ed
@@ -1043,7 +1043,10 @@ PIPEWIRE_OpenDevice(_THIS, void *handle, const char *devname, int iscapture)
|
||||
/* Get the hints for the application name, stream name and role */
|
||||
app_name = SDL_GetHint(SDL_HINT_AUDIO_DEVICE_APP_NAME);
|
||||
if (!app_name || *app_name == '\0') {
|
||||
app_name = "SDL Application";
|
||||
app_name = SDL_GetHint(SDL_HINT_APP_NAME);
|
||||
if (!app_name || *app_name == '\0') {
|
||||
app_name = "SDL Application";
|
||||
}
|
||||
}
|
||||
|
||||
stream_name = SDL_GetHint(SDL_HINT_AUDIO_DEVICE_STREAM_NAME);
|
||||
|
||||
Reference in New Issue
Block a user