mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-05-01 16:58:22 +00:00
sdl window: Added game title (serial, title and app_ver)
This commit is contained in:
parent
f29293c9fb
commit
f35518d527
3 changed files with 17 additions and 9 deletions
|
@ -18,14 +18,15 @@
|
|||
|
||||
namespace Frontend {
|
||||
|
||||
WindowSDL::WindowSDL(s32 width_, s32 height_, Input::GameController* controller_)
|
||||
: width{width_}, height{height_}, controller{controller_} {
|
||||
WindowSDL::WindowSDL(s32 width_, s32 height_, Input::GameController* controller_,
|
||||
std::string game_title_)
|
||||
: width{width_}, height{height_}, controller{controller_}, game_title{game_title_} {
|
||||
if (SDL_Init(SDL_INIT_VIDEO) < 0) {
|
||||
UNREACHABLE_MSG("Failed to initialize SDL video subsystem: {}", SDL_GetError());
|
||||
}
|
||||
SDL_InitSubSystem(SDL_INIT_AUDIO);
|
||||
|
||||
const std::string title = "shadPS4 v" + std::string(Common::VERSION);
|
||||
const std::string title = "shadPS4 v" + std::string(Common::VERSION) + " | " + game_title;
|
||||
SDL_PropertiesID props = SDL_CreateProperties();
|
||||
SDL_SetStringProperty(props, SDL_PROP_WINDOW_CREATE_TITLE_STRING, title.c_str());
|
||||
SDL_SetNumberProperty(props, SDL_PROP_WINDOW_CREATE_X_NUMBER, SDL_WINDOWPOS_CENTERED);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue