mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2024-12-28 02:26:07 +00:00
Fix for "shadPS4" not being given on Linux volume mixers (#1789)
This commit is contained in:
parent
876445faf1
commit
af26c945b1
|
@ -2,6 +2,7 @@
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
#include <SDL3/SDL_events.h>
|
#include <SDL3/SDL_events.h>
|
||||||
|
#include <SDL3/SDL_hints.h>
|
||||||
#include <SDL3/SDL_init.h>
|
#include <SDL3/SDL_init.h>
|
||||||
#include <SDL3/SDL_properties.h>
|
#include <SDL3/SDL_properties.h>
|
||||||
#include <SDL3/SDL_timer.h>
|
#include <SDL3/SDL_timer.h>
|
||||||
|
@ -68,6 +69,9 @@ static Uint32 SDLCALL PollController(void* userdata, SDL_TimerID timer_id, Uint3
|
||||||
WindowSDL::WindowSDL(s32 width_, s32 height_, Input::GameController* controller_,
|
WindowSDL::WindowSDL(s32 width_, s32 height_, Input::GameController* controller_,
|
||||||
std::string_view window_title)
|
std::string_view window_title)
|
||||||
: width{width_}, height{height_}, controller{controller_} {
|
: width{width_}, height{height_}, controller{controller_} {
|
||||||
|
if (!SDL_SetHint(SDL_HINT_APP_NAME, "shadPS4")) {
|
||||||
|
UNREACHABLE_MSG("Failed to set SDL window hint: {}", SDL_GetError());
|
||||||
|
}
|
||||||
if (!SDL_Init(SDL_INIT_VIDEO)) {
|
if (!SDL_Init(SDL_INIT_VIDEO)) {
|
||||||
UNREACHABLE_MSG("Failed to initialize SDL video subsystem: {}", SDL_GetError());
|
UNREACHABLE_MSG("Failed to initialize SDL video subsystem: {}", SDL_GetError());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue