From 7b24b40c3fb8bf6650b220e42e314ed76c84cbf0 Mon Sep 17 00:00:00 2001 From: Kenix3 Date: Mon, 22 May 2023 22:00:40 -0400 Subject: [PATCH] No longer changing title of the window in DirectX (#285) --- src/graphic/Fast3D/gfx_dxgi.cpp | 8 +------- src/graphic/Fast3D/gfx_sdl2.cpp | 2 +- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/graphic/Fast3D/gfx_dxgi.cpp b/src/graphic/Fast3D/gfx_dxgi.cpp index ce060f8..0d55d7d 100644 --- a/src/graphic/Fast3D/gfx_dxgi.cpp +++ b/src/graphic/Fast3D/gfx_dxgi.cpp @@ -304,7 +304,7 @@ void gfx_dxgi_init(const char* game_name, const char* gfx_api_name, bool start_i char title[512]; wchar_t w_title[512]; - int len = sprintf(title, "%s (%s - %s)", game_name, GFX_BACKEND_NAME, gfx_api_name); + int len = sprintf(title, "%s (%s)", game_name, gfx_api_name); mbstowcs(w_title, title, len + 1); dxgi.game_name = game_name; @@ -691,12 +691,6 @@ void gfx_dxgi_create_factory_and_device(bool debug, int d3d_version, } } create_device_fn(adapter.Get(), false); - - char title[512]; - wchar_t w_title[512]; - int len = sprintf(title, "%s (Direct3D %d)", dxgi.game_name.c_str(), d3d_version); - mbstowcs(w_title, title, len + 1); - SetWindowTextW(dxgi.h_wnd, w_title); } void gfx_dxgi_create_swap_chain(IUnknown* device, std::function&& before_destroy_fn) { diff --git a/src/graphic/Fast3D/gfx_sdl2.cpp b/src/graphic/Fast3D/gfx_sdl2.cpp index 1af6dde..79239e7 100644 --- a/src/graphic/Fast3D/gfx_sdl2.cpp +++ b/src/graphic/Fast3D/gfx_sdl2.cpp @@ -298,7 +298,7 @@ static void gfx_sdl_init(const char* game_name, const char* gfx_api_name, bool s #endif char title[512]; - int len = sprintf(title, "%s (%s - %s)", game_name, GFX_BACKEND_NAME, gfx_api_name); + int len = sprintf(title, "%s (%s)", game_name, gfx_api_name); #ifdef __SWITCH__ // For Switch we need to set the window width before creating the window