mirror of
https://github.com/libretro/RetroArch
synced 2025-03-02 19:13:34 +00:00
(D3D) Add common window title for D3D9+
This commit is contained in:
parent
52b827155f
commit
04962e1741
@ -2378,3 +2378,22 @@ bool win32_window_init(WNDCLASSEX *wndclass,
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
void win32_update_title(void)
|
||||
{
|
||||
#ifndef _XBOX
|
||||
const ui_window_t *window = ui_companion_driver_get_window_ptr();
|
||||
|
||||
if (window)
|
||||
{
|
||||
char title[128];
|
||||
|
||||
title[0] = '\0';
|
||||
|
||||
video_driver_get_window_title(title, sizeof(title));
|
||||
|
||||
if (title[0])
|
||||
window->set_title(&main_window, title);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@ -162,6 +162,8 @@ void win32_unset_input_userdata(void);
|
||||
|
||||
void win32_set_input_userdata(void *data);
|
||||
|
||||
void win32_update_title(void);
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
||||
|
@ -1547,6 +1547,7 @@ static bool d3d10_gfx_frame(
|
||||
}
|
||||
d3d10->sprites.enabled = false;
|
||||
|
||||
win32_update_title();
|
||||
DXGIPresent(d3d10->swapChain, !!d3d10->vsync, 0);
|
||||
|
||||
return true;
|
||||
|
@ -1666,6 +1666,7 @@ static bool d3d11_gfx_frame(
|
||||
}
|
||||
d3d11->sprites.enabled = false;
|
||||
|
||||
win32_update_title();
|
||||
DXGIPresent(d3d11->swapChain, !!vsync, present_flags);
|
||||
Release(rtv);
|
||||
|
||||
|
@ -1613,6 +1613,7 @@ static bool d3d12_gfx_frame(
|
||||
|
||||
D3D12ExecuteGraphicsCommandLists(d3d12->queue.handle, 1, &d3d12->queue.cmd);
|
||||
|
||||
win32_update_title();
|
||||
#if 1
|
||||
DXGIPresent(d3d12->chain.handle, !!vsync, present_flags);
|
||||
#else
|
||||
|
@ -1492,25 +1492,6 @@ static void d3d9_get_overlay_interface(void *data,
|
||||
}
|
||||
#endif
|
||||
|
||||
static void d3d9_update_title(void)
|
||||
{
|
||||
#ifndef _XBOX
|
||||
const ui_window_t *window = ui_companion_driver_get_window_ptr();
|
||||
|
||||
if (window)
|
||||
{
|
||||
char title[128];
|
||||
|
||||
title[0] = '\0';
|
||||
|
||||
video_driver_get_window_title(title, sizeof(title));
|
||||
|
||||
if (title[0])
|
||||
window->set_title(&main_window, title);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
static bool d3d9_frame(void *data, const void *frame,
|
||||
unsigned frame_width, unsigned frame_height,
|
||||
uint64_t frame_count, unsigned pitch,
|
||||
@ -1638,7 +1619,7 @@ static bool d3d9_frame(void *data, const void *frame,
|
||||
d3d9_end_scene(d3d->dev);
|
||||
}
|
||||
|
||||
d3d9_update_title();
|
||||
win32_update_title();
|
||||
d3d9_swap(d3d, d3d->dev);
|
||||
|
||||
return true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user