From d739e4771efb3455e8693027723690376f2f0538 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sat, 4 Jun 2016 06:02:15 +0200 Subject: [PATCH] Use set_title function from wgl_ctx.cpp --- gfx/common/win32_common.cpp | 4 +--- gfx/common/win32_common.h | 2 ++ gfx/drivers_context/wgl_ctx.cpp | 5 +---- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/gfx/common/win32_common.cpp b/gfx/common/win32_common.cpp index 5a613364a1..cf62e81b63 100644 --- a/gfx/common/win32_common.cpp +++ b/gfx/common/win32_common.cpp @@ -25,8 +25,6 @@ #include "../../tasks/tasks_internal.h" #include "../../core_info.h" -#include "../../ui/drivers/win32/ui_win32_window.h" - #if !defined(_XBOX) #define IDI_ICON 1 @@ -66,7 +64,7 @@ static unsigned g_pos_y = CW_USEDEFAULT; static bool g_resized; bool g_inited; static bool g_quit; -static ui_window_win32_t main_window; +ui_window_win32_t main_window; extern void *dinput_wgl; static void *curD3D = NULL; diff --git a/gfx/common/win32_common.h b/gfx/common/win32_common.h index 3d4f5fba0c..8b28ec38f6 100644 --- a/gfx/common/win32_common.h +++ b/gfx/common/win32_common.h @@ -35,11 +35,13 @@ #ifndef _XBOX #include "../../ui/drivers/ui_win32_resource.h" +#include "../../ui/drivers/win32/ui_win32_window.h" extern unsigned g_resize_width; extern unsigned g_resize_height; extern bool g_inited; extern bool g_restore_desktop; +extern ui_window_win32_t main_window; LRESULT win32_handle_keyboard_event(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam); diff --git a/gfx/drivers_context/wgl_ctx.cpp b/gfx/drivers_context/wgl_ctx.cpp index 2f7cdbd753..6a2e06bcf8 100644 --- a/gfx/drivers_context/wgl_ctx.cpp +++ b/gfx/drivers_context/wgl_ctx.cpp @@ -389,13 +389,10 @@ static void gfx_ctx_wgl_update_window_title(void *data) char buf[128] = {0}; char buf_fps[128] = {0}; settings_t *settings = config_get_ptr(); - HWND window = win32_get_window(); - - (void)data; if (video_monitor_get_fps(buf, sizeof(buf), buf_fps, sizeof(buf_fps))) - SetWindowText(window, buf); + ui_window_win32_set_title(&main_window, buf); if (settings->fps_show) runloop_msg_queue_push(buf_fps, 1, 1, false); }