Skip to content

Commit af26c94

Browse files
authored
Fix for "shadPS4" not being given on Linux volume mixers (#1789)
1 parent 876445f commit af26c94

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/sdl_window.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// SPDX-License-Identifier: GPL-2.0-or-later
33

44
#include <SDL3/SDL_events.h>
5+
#include <SDL3/SDL_hints.h>
56
#include <SDL3/SDL_init.h>
67
#include <SDL3/SDL_properties.h>
78
#include <SDL3/SDL_timer.h>
@@ -68,6 +69,9 @@ static Uint32 SDLCALL PollController(void* userdata, SDL_TimerID timer_id, Uint3
6869
WindowSDL::WindowSDL(s32 width_, s32 height_, Input::GameController* controller_,
6970
std::string_view window_title)
7071
: width{width_}, height{height_}, controller{controller_} {
72+
if (!SDL_SetHint(SDL_HINT_APP_NAME, "shadPS4")) {
73+
UNREACHABLE_MSG("Failed to set SDL window hint: {}", SDL_GetError());
74+
}
7175
if (!SDL_Init(SDL_INIT_VIDEO)) {
7276
UNREACHABLE_MSG("Failed to initialize SDL video subsystem: {}", SDL_GetError());
7377
}

0 commit comments

Comments
 (0)