mirror of
https://github.com/izzy2lost/libultraship.git
synced 2026-06-19 01:16:13 -07:00
No longer changing title of the window in DirectX (#285)
This commit is contained in:
@@ -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<void()>&& before_destroy_fn) {
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user