Remove dxgi_update_title

This commit is contained in:
twinaphex 2020-08-03 15:48:08 +02:00
parent 89461eb6a5
commit 332bcc7f9e
7 changed files with 68 additions and 49 deletions

View File

@ -297,25 +297,6 @@ void dxgi_copy(
#pragma warning(default : 4293)
#endif
void dxgi_update_title(void)
{
#ifndef __WINRT__
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
}
DXGI_FORMAT glslang_format_to_dxgi(glslang_format fmt)
{
#undef FMT_

View File

@ -830,8 +830,6 @@ void dxgi_copy(
int dst_pitch,
void* dst_data);
void dxgi_update_title(void);
DXGI_FORMAT glslang_format_to_dxgi(glslang_format fmt);
RETRO_END_DECLS

View File

@ -277,20 +277,6 @@ typedef REASON_CONTEXT POWER_REQUEST_CONTEXT, *PPOWER_REQUEST_CONTEXT, *LPPOWER_
#define INT_PTR_COMPAT INT_PTR
#endif
/* TODO/FIXME - globals */
bool g_win32_restore_desktop = false;
static bool taskbar_is_created = false;
bool g_win32_inited = false;
unsigned g_win32_resize_width = 0;
unsigned g_win32_resize_height = 0;
ui_window_win32_t main_window;
static HMONITOR win32_monitor_last;
static HMONITOR win32_monitor_all[MAX_MONITORS];
typedef struct win32_common_state
{
int pos_x;
@ -303,6 +289,18 @@ typedef struct win32_common_state
bool resized;
} win32_common_state_t;
/* TODO/FIXME - globals */
bool g_win32_restore_desktop = false;
bool g_win32_inited = false;
unsigned g_win32_resize_width = 0;
unsigned g_win32_resize_height = 0;
ui_window_win32_t main_window;
/* TODO/FIXME - static globals */
static bool taskbar_is_created = false;
static HMONITOR win32_monitor_last;
static HMONITOR win32_monitor_all[MAX_MONITORS];
static win32_common_state_t win32_st =
{
CW_USEDEFAULT, /* pos_x */
@ -315,7 +313,6 @@ static win32_common_state_t win32_st =
false /* resized */
};
bool win32_taskbar_is_created(void)
{
return taskbar_is_created;

View File

@ -57,25 +57,23 @@
#define MOVERESIZE_X_SHIFT 8
#define MOVERESIZE_Y_SHIFT 9
#define V_DBLSCAN 0x20
#define V_DBLSCAN 0x20
/* TODO/FIXME - globals */
bool g_x11_entered = false;
Display *g_x11_dpy = NULL;
unsigned g_x11_screen = 0;
Window g_x11_win = None;
Colormap g_x11_cmap;
/* TODO/FIXME - static globals */
static XF86VidModeModeInfo desktop_mode;
static bool xdg_screensaver_available = true;
bool g_x11_entered = false;
static bool g_x11_has_focus = false;
static bool g_x11_true_full = false;
Display *g_x11_dpy = NULL;
unsigned g_x11_screen = 0;
Colormap g_x11_cmap;
Window g_x11_win = None;
static Atom XA_NET_WM_STATE;
static Atom XA_NET_WM_STATE_FULLSCREEN;
static Atom XA_NET_MOVERESIZE_WINDOW;
static Atom g_x11_quit_atom;
static XIM g_x11_xim;
static XIC g_x11_xic;

View File

@ -1519,7 +1519,22 @@ static bool d3d10_gfx_frame(
D3D10SetBlendState(d3d10->device, d3d10->blend_enable, NULL, D3D10_DEFAULT_SAMPLE_MASK);
D3D10SetVertexBuffer(d3d10->device, 0, d3d10->sprites.vbo, sizeof(d3d10_sprite_t), 0);
font_driver_render_msg(d3d10, msg, NULL, NULL);
dxgi_update_title();
#ifndef __WINRT__
{
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
}
d3d10->sprites.enabled = false;

View File

@ -1594,7 +1594,22 @@ static bool d3d11_gfx_frame(
D3D11SetBlendState(d3d11->context, d3d11->blend_enable, NULL, D3D11_DEFAULT_SAMPLE_MASK);
D3D11SetVertexBuffer(context, 0, d3d11->sprites.vbo, sizeof(d3d11_sprite_t), 0);
font_driver_render_msg(d3d11, msg, NULL, NULL);
dxgi_update_title();
#ifndef __WINRT__
{
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
}
d3d11->sprites.enabled = false;

View File

@ -1584,7 +1584,22 @@ static bool d3d12_gfx_frame(
D3D12IASetVertexBuffers(d3d12->queue.cmd, 0, 1, &d3d12->sprites.vbo_view);
font_driver_render_msg(d3d12, msg, NULL, NULL);
dxgi_update_title();
#ifndef __WINRT__
{
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
}
d3d12->sprites.enabled = false;