diff --git a/configuration.c b/configuration.c index 528873fa6a..1d59a5fe4a 100644 --- a/configuration.c +++ b/configuration.c @@ -1355,10 +1355,10 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings, SETTING_BOOL("check_firmware_before_loading", &settings->bools.check_firmware_before_loading, true, check_firmware_before_loading, false); SETTING_BOOL("builtin_mediaplayer_enable", &settings->bools.multimedia_builtin_mediaplayer_enable, false, false /* TODO */, false); SETTING_BOOL("builtin_imageviewer_enable", &settings->bools.multimedia_builtin_imageviewer_enable, true, true, false); - SETTING_BOOL("fps_show", &settings->bools.video_fps_show, true, false, false); - SETTING_BOOL("statistics_show", &settings->bools.video_statistics_show, true, false, false); - SETTING_BOOL("framecount_show", &settings->bools.video_framecount_show, true, false, false); - SETTING_BOOL("memory_show", &settings->bools.video_memory_show, true, false, false); + SETTING_BOOL("fps_show", &settings->bools.video_fps_show, true, fps_show, false); + SETTING_BOOL("statistics_show", &settings->bools.video_statistics_show, true, statistics_show, false); + SETTING_BOOL("framecount_show", &settings->bools.video_framecount_show, true, framecount_show, false); + SETTING_BOOL("memory_show", &settings->bools.video_memory_show, true, memory_show, false); SETTING_BOOL("ui_menubar_enable", &settings->bools.ui_menubar_enable, true, true, false); SETTING_BOOL("suspend_screensaver_enable", &settings->bools.ui_suspend_screensaver_enable, true, true, false); SETTING_BOOL("rewind_enable", &settings->bools.rewind_enable, true, rewind_enable, false); diff --git a/gfx/common/dxgi_common.c b/gfx/common/dxgi_common.c index 86f4a7b987..52c690747a 100644 --- a/gfx/common/dxgi_common.c +++ b/gfx/common/dxgi_common.c @@ -28,6 +28,7 @@ #include "../../verbosity.h" #include "../../ui/ui_companion_driver.h" #include "../video_driver.h" +#include "../frontend/frontend_driver.h" #include "win32_common.h" #if defined(HAVE_DYNAMIC) && !defined(__WINRT__) @@ -310,15 +311,15 @@ void dxgi_update_title(video_frame_info_t* video_info) if (settings->bools.video_memory_show) { #ifndef __WINRT__ - MEMORYSTATUS stat; + uint64_t mem_bytes_used = frontend_driver_get_used_memory(); + uint64_t mem_bytes_total = frontend_driver_get_total_memory(); char mem[128]; mem[0] = '\0'; - GlobalMemoryStatus(&stat); snprintf( - mem, sizeof(mem), " || MEM: %.2f/%.2fMB", stat.dwAvailPhys / (1024.0f * 1024.0f), - stat.dwTotalPhys / (1024.0f * 1024.0f)); + mem, sizeof(mem), " || MEM: %.2f/%.2fMB", mem_bytes_used / (1024.0f * 1024.0f), + mem_bytes_total / (1024.0f * 1024.0f)); strlcat(video_info->fps_text, mem, sizeof(video_info->fps_text)); #endif } diff --git a/gfx/common/x11_common.c b/gfx/common/x11_common.c index e9ca2ec57c..7a93378b6b 100644 --- a/gfx/common/x11_common.c +++ b/gfx/common/x11_common.c @@ -39,6 +39,7 @@ #include #include +#include #ifdef HAVE_DBUS #include "dbus_common.h" @@ -49,6 +50,7 @@ #include "../../input/input_keymaps.h" #include "../../input/common/input_x11_common.h" #include "../../verbosity.h" +#include "../../configuration.h" #define _NET_WM_STATE_ADD 1 #define MOVERESIZE_GRAVITY_CENTER 5 @@ -648,10 +650,26 @@ bool x11_connect(void) void x11_update_title(void *data, void *data2) { + const settings_t *settings = config_get_ptr(); + video_frame_info_t *video_info = (video_frame_info_t*)data2; char title[128]; title[0] = '\0'; + if (settings->bools.video_memory_show) + { + uint64_t mem_bytes_used = frontend_driver_get_used_memory(); + uint64_t mem_bytes_total = frontend_driver_get_total_memory(); + char mem[128]; + + mem[0] = '\0'; + + snprintf( + mem, sizeof(mem), " || MEM: %.2f/%.2fMB", mem_bytes_used / (1024.0f * 1024.0f), + mem_bytes_total / (1024.0f * 1024.0f)); + strlcat(video_info->fps_text, mem, sizeof(video_info->fps_text)); + } + video_driver_get_window_title(title, sizeof(title)); if (title[0]) diff --git a/gfx/drivers/d3d11.c b/gfx/drivers/d3d11.c index a0772a180c..1d1b5246ca 100644 --- a/gfx/drivers/d3d11.c +++ b/gfx/drivers/d3d11.c @@ -31,7 +31,7 @@ #include "../../driver.h" #include "../../verbosity.h" -#include "../configuration.h" +#include "../../configuration.h" #include "../../retroarch.h" #include "../video_driver.h" #include "../font_driver.h" diff --git a/gfx/drivers/d3d8.c b/gfx/drivers/d3d8.c index ae9d9015fa..b6f58d3c10 100644 --- a/gfx/drivers/d3d8.c +++ b/gfx/drivers/d3d8.c @@ -37,6 +37,7 @@ #include "../video_coord_array.h" #include "../../configuration.h" #include "../../dynamic.h" +#include "../../frontend/frontend_driver.h" #include "../video_driver.h" #ifdef HAVE_THREADS @@ -1492,21 +1493,25 @@ static void d3d8_get_overlay_interface(void *data, static void d3d8_update_title(video_frame_info_t *video_info) { + const settings_t *settings = config_get_ptr(); #ifndef _XBOX const ui_window_t *window = ui_companion_driver_get_window_ptr(); #endif - if (video_info->fps_show) + if (settings->bools.video_memory_show) { - MEMORYSTATUS stat; - char mem[128]; +#ifndef __WINRT__ + uint64_t mem_bytes_used = frontend_driver_get_used_memory(); + uint64_t mem_bytes_total = frontend_driver_get_total_memory(); + char mem[128]; mem[0] = '\0'; - GlobalMemoryStatus(&stat); - snprintf(mem, sizeof(mem), "|| MEM: %.2f/%.2fMB", - stat.dwAvailPhys/(1024.0f*1024.0f), stat.dwTotalPhys/(1024.0f*1024.0f)); + snprintf( + mem, sizeof(mem), " || MEM: %.2f/%.2fMB", mem_bytes_used / (1024.0f * 1024.0f), + mem_bytes_total / (1024.0f * 1024.0f)); strlcat(video_info->fps_text, mem, sizeof(video_info->fps_text)); +#endif } #ifndef _XBOX diff --git a/gfx/drivers/d3d9.c b/gfx/drivers/d3d9.c index 02298010ba..28c2316acd 100644 --- a/gfx/drivers/d3d9.c +++ b/gfx/drivers/d3d9.c @@ -39,6 +39,7 @@ #include "../../dynamic.h" #include "../video_driver.h" #include "../../ui/ui_companion_driver.h" +#include "../../frontend/frontend_driver.h" #ifdef HAVE_THREADS #include "../video_thread_wrapper.h" @@ -1562,23 +1563,27 @@ static void d3d9_get_overlay_interface(void *data, static void d3d9_update_title(video_frame_info_t *video_info) { + const settings_t *settings = config_get_ptr(); #ifdef _XBOX const ui_window_t *window = NULL; #else const ui_window_t *window = ui_companion_driver_get_window_ptr(); #endif - if (video_info->fps_show) + if (settings->bools.video_memory_show) { - MEMORYSTATUS stat; - char mem[128]; +#ifndef __WINRT__ + uint64_t mem_bytes_used = frontend_driver_get_used_memory(); + uint64_t mem_bytes_total = frontend_driver_get_total_memory(); + char mem[128]; mem[0] = '\0'; - GlobalMemoryStatus(&stat); - snprintf(mem, sizeof(mem), "|| MEM: %.2f/%.2fMB", - stat.dwAvailPhys/(1024.0f*1024.0f), stat.dwTotalPhys/(1024.0f*1024.0f)); + snprintf( + mem, sizeof(mem), " || MEM: %.2f/%.2fMB", mem_bytes_used / (1024.0f * 1024.0f), + mem_bytes_total / (1024.0f * 1024.0f)); strlcat(video_info->fps_text, mem, sizeof(video_info->fps_text)); +#endif } #ifndef _XBOX diff --git a/gfx/drivers/drm_gfx.c b/gfx/drivers/drm_gfx.c index bf04766711..4f071167c2 100644 --- a/gfx/drivers/drm_gfx.c +++ b/gfx/drivers/drm_gfx.c @@ -793,6 +793,9 @@ static bool drm_gfx_frame(void *data, const void *frame, unsigned width, menu_driver_frame(video_info); #endif + video_info->cb_update_window_title( + video_info->context_data, video_info); + /* Update main surface: locate free page, blit and flip. */ drm_surface_update(_drmvars, frame, _drmvars->main_surface); return true; diff --git a/gfx/drivers_context/android_ctx.c b/gfx/drivers_context/android_ctx.c index 123c9780ba..6438995fc1 100644 --- a/gfx/drivers_context/android_ctx.c +++ b/gfx/drivers_context/android_ctx.c @@ -19,6 +19,7 @@ #include #include +#include #ifdef HAVE_CONFIG_H #include "../../config.h" @@ -36,8 +37,10 @@ #include "../common/vulkan_common.h" #endif +#include "../../frontend/frontend_driver.h" #include "../../frontend/drivers/platform_unix.h" #include "../../verbosity.h" +#include "../../configuration.h" static enum gfx_ctx_api android_api = GFX_CTX_NONE; @@ -595,6 +598,26 @@ static void android_gfx_ctx_set_flags(void *data, uint32_t flags) (void)flags; } +static void android_gfx_update_window_title(void *data, void *data2) +{ + const settings_t *settings = config_get_ptr(); + video_frame_info_t* video_info = (video_frame_info_t*)data2; + + if (settings->bools.video_memory_show) + { + uint64_t mem_bytes_used = frontend_driver_get_used_memory(); + uint64_t mem_bytes_total = frontend_driver_get_total_memory(); + char mem[128]; + + mem[0] = '\0'; + + snprintf( + mem, sizeof(mem), " || MEM: %.2f/%.2fMB", mem_bytes_used / (1024.0f * 1024.0f), + mem_bytes_total / (1024.0f * 1024.0f)); + strlcat(video_info->fps_text, mem, sizeof(video_info->fps_text)); + } +} + const gfx_ctx_driver_t gfx_ctx_android = { android_gfx_ctx_init, android_gfx_ctx_destroy, @@ -609,7 +632,7 @@ const gfx_ctx_driver_t gfx_ctx_android = { NULL, /* get_video_output_next */ android_gfx_ctx_get_metrics, NULL, - NULL, /* update_title */ + android_gfx_update_window_title, android_gfx_ctx_check_window, android_gfx_ctx_set_resize, android_gfx_ctx_has_focus, diff --git a/gfx/drivers_context/drm_ctx.c b/gfx/drivers_context/drm_ctx.c index 096c8ba5f7..94e4327577 100644 --- a/gfx/drivers_context/drm_ctx.c +++ b/gfx/drivers_context/drm_ctx.c @@ -919,6 +919,26 @@ static void gfx_ctx_drm_set_flags(void *data, uint32_t flags) drm->core_hw_context_enable = true; } +void gfx_ctx_drm_update_window_title(void *data, void *data2) +{ + const settings_t *settings = config_get_ptr(); + video_frame_info_t* video_info = (video_frame_info_t*)data2; + + if (settings->bools.video_memory_show) + { + uint64_t mem_bytes_used = frontend_driver_get_used_memory(); + uint64_t mem_bytes_total = frontend_driver_get_total_memory(); + char mem[128]; + + mem[0] = '\0'; + + snprintf( + mem, sizeof(mem), " || MEM: %.2f/%.2fMB", mem_bytes_used / (1024.0f * 1024.0f), + mem_bytes_total / (1024.0f * 1024.0f)); + strlcat(video_info->fps_text, mem, sizeof(video_info->fps_text)); + } +} + const gfx_ctx_driver_t gfx_ctx_drm = { gfx_ctx_drm_init, gfx_ctx_drm_destroy, @@ -933,7 +953,7 @@ const gfx_ctx_driver_t gfx_ctx_drm = { NULL, /* get_video_output_next */ NULL, /* get_metrics */ NULL, - NULL, /* update_window_title */ + gfx_ctx_drm_update_window_title, gfx_ctx_drm_check_window, NULL, /* set_resize */ gfx_ctx_drm_has_focus, diff --git a/gfx/drivers_context/gdi_ctx.c b/gfx/drivers_context/gdi_ctx.c index 9ced343e99..2d4bb39dbb 100644 --- a/gfx/drivers_context/gdi_ctx.c +++ b/gfx/drivers_context/gdi_ctx.c @@ -37,6 +37,7 @@ #include "../../configuration.h" #include "../../dynamic.h" #include "../../verbosity.h" +#include "../../frontend/frontend_driver.h" #include "../video_driver.h" #include "../common/win32_common.h" @@ -95,11 +96,29 @@ static bool gfx_ctx_gdi_set_resize(void *data, static void gfx_ctx_gdi_update_window_title(void *data, void *data2) { + const settings_t *settings = config_get_ptr(); + video_frame_info_t* video_info = (video_frame_info_t*)data2; const ui_window_t *window = ui_companion_driver_get_window_ptr(); char title[128]; title[0] = '\0'; + if (settings->bools.video_memory_show) + { +#ifndef __WINRT__ + uint64_t mem_bytes_used = frontend_driver_get_used_memory(); + uint64_t mem_bytes_total = frontend_driver_get_total_memory(); + char mem[128]; + + mem[0] = '\0'; + + snprintf( + mem, sizeof(mem), " || MEM: %.2f/%.2fMB", mem_bytes_used / (1024.0f * 1024.0f), + mem_bytes_total / (1024.0f * 1024.0f)); + strlcat(video_info->fps_text, mem, sizeof(video_info->fps_text)); +#endif + } + video_driver_get_window_title(title, sizeof(title)); if (window && title[0]) diff --git a/gfx/drivers_context/khr_display_ctx.c b/gfx/drivers_context/khr_display_ctx.c index 60edb781fb..673f14169e 100644 --- a/gfx/drivers_context/khr_display_ctx.c +++ b/gfx/drivers_context/khr_display_ctx.c @@ -13,6 +13,8 @@ * If not, see . */ +#include + #ifdef HAVE_CONFIG_H #include "../../config.h" #endif @@ -20,6 +22,7 @@ #include "../../frontend/frontend_driver.h" #include "../common/vulkan_common.h" #include "../../verbosity.h" +#include "../../configuration.h" typedef struct { @@ -234,6 +237,26 @@ static void *gfx_ctx_khr_display_get_context_data(void *data) return &khr->vk.context; } +static void gfx_ctx_khr_display_update_window_title(void *data, void *data2) +{ + const settings_t *settings = config_get_ptr(); + video_frame_info_t *video_info = (video_frame_info_t*)data2; + + if (settings->bools.video_memory_show) + { + uint64_t mem_bytes_used = frontend_driver_get_used_memory(); + uint64_t mem_bytes_total = frontend_driver_get_total_memory(); + char mem[128]; + + mem[0] = '\0'; + + snprintf( + mem, sizeof(mem), " || MEM: %.2f/%.2fMB", mem_bytes_used / (1024.0f * 1024.0f), + mem_bytes_total / (1024.0f * 1024.0f)); + strlcat(video_info->fps_text, mem, sizeof(video_info->fps_text)); + } +} + const gfx_ctx_driver_t gfx_ctx_khr_display = { gfx_ctx_khr_display_init, gfx_ctx_khr_display_destroy, @@ -248,7 +271,7 @@ const gfx_ctx_driver_t gfx_ctx_khr_display = { NULL, /* get_video_output_next */ NULL, /* get_metrics */ NULL, - NULL, /* update_title */ + gfx_ctx_khr_display_update_window_title, gfx_ctx_khr_display_check_window, gfx_ctx_khr_display_set_resize, gfx_ctx_khr_display_has_focus, diff --git a/gfx/drivers_context/mali_fbdev_ctx.c b/gfx/drivers_context/mali_fbdev_ctx.c index ebb5960d2b..95eb6b7359 100644 --- a/gfx/drivers_context/mali_fbdev_ctx.c +++ b/gfx/drivers_context/mali_fbdev_ctx.c @@ -24,6 +24,8 @@ #include #include +#include + #ifdef HAVE_CONFIG_H #include "../../config.h" #endif @@ -38,6 +40,7 @@ #include "../../frontend/frontend_driver.h" #include "../../verbosity.h" +#include "../../configuration.h" typedef struct { @@ -300,6 +303,26 @@ static float gfx_ctx_mali_fbdev_get_refresh_rate(void *data) return mali->refresh_rate; } +static void gfx_ctx_mali_fbdev_update_window_title(void *data, void *data2) +{ + const settings_t *settings = config_get_ptr(); + video_frame_info_t* video_info = (video_frame_info_t*)data2; + + if (settings->bools.video_memory_show) + { + uint64_t mem_bytes_used = frontend_driver_get_used_memory(); + uint64_t mem_bytes_total = frontend_driver_get_total_memory(); + char mem[128]; + + mem[0] = '\0'; + + snprintf( + mem, sizeof(mem), " || MEM: %.2f/%.2fMB", mem_bytes_used / (1024.0f * 1024.0f), + mem_bytes_total / (1024.0f * 1024.0f)); + strlcat(video_info->fps_text, mem, sizeof(video_info->fps_text)); + } +} + const gfx_ctx_driver_t gfx_ctx_mali_fbdev = { gfx_ctx_mali_fbdev_init, gfx_ctx_mali_fbdev_destroy, @@ -314,7 +337,7 @@ const gfx_ctx_driver_t gfx_ctx_mali_fbdev = { NULL, /* get_video_output_next */ NULL, /* get_metrics */ NULL, - NULL, /* update_title */ + gfx_ctx_mali_fbdev_update_window_title, gfx_ctx_mali_fbdev_check_window, NULL, /* set_resize */ gfx_ctx_mali_fbdev_has_focus, diff --git a/gfx/drivers_context/orbis_ctx.c b/gfx/drivers_context/orbis_ctx.c index 5bd1733b55..2d2ff81714 100644 --- a/gfx/drivers_context/orbis_ctx.c +++ b/gfx/drivers_context/orbis_ctx.c @@ -15,12 +15,16 @@ */ #include + +#include + #ifdef HAVE_CONFIG_H #include "../../config.h" #endif #include "../common/orbis_common.h" #include "../../frontend/frontend_driver.h" +#include "../../configuration.h" static enum gfx_ctx_api ctx_orbis_api = GFX_CTX_OPENGL_API; @@ -273,6 +277,26 @@ static float orbis_ctx_get_refresh_rate(void *data) return ctx_orbis->refresh_rate; } +static void orbis_ctx_update_window_title(void *data, void *data2) +{ + const settings_t *settings = config_get_ptr(); + video_frame_info_t* video_info = (video_frame_info_t*)data2; + + if (settings->bools.video_memory_show) + { + uint64_t mem_bytes_used = frontend_driver_get_used_memory(); + uint64_t mem_bytes_total = frontend_driver_get_total_memory(); + char mem[128]; + + mem[0] = '\0'; + + snprintf( + mem, sizeof(mem), " || MEM: %.2f/%.2fMB", mem_bytes_used / (1024.0f * 1024.0f), + mem_bytes_total / (1024.0f * 1024.0f)); + strlcat(video_info->fps_text, mem, sizeof(video_info->fps_text)); + } +} + const gfx_ctx_driver_t orbis_ctx = { orbis_ctx_init, orbis_ctx_destroy, @@ -287,7 +311,7 @@ const gfx_ctx_driver_t orbis_ctx = { NULL, /* get_video_output_next */ NULL, /* get_metrics */ NULL, - NULL, /* update_title */ + orbis_ctx_update_window_title, orbis_ctx_check_window, NULL, /* set_resize */ orbis_ctx_has_focus, diff --git a/gfx/drivers_context/ps3_ctx.c b/gfx/drivers_context/ps3_ctx.c index 06b3a2059e..4743e2ccf3 100644 --- a/gfx/drivers_context/ps3_ctx.c +++ b/gfx/drivers_context/ps3_ctx.c @@ -30,9 +30,12 @@ #endif #endif +#include + #include "../../configuration.h" #include "../../verbosity.h" #include "../../defines/ps3_defines.h" +#include "../../frontend/frontend_driver.h" #include "../common/gl_common.h" #include "../video_driver.h" @@ -411,6 +414,26 @@ static void gfx_ctx_ps3_set_flags(void *data, uint32_t flags) (void)data; } +static void gfx_ctx_ps3_update_window_title(void *data, void *data2) +{ + const settings_t *settings = config_get_ptr(); + video_frame_info_t* video_info = (video_frame_info_t*)data2; + + if (settings->bools.video_memory_show) + { + uint64_t mem_bytes_used = frontend_driver_get_used_memory(); + uint64_t mem_bytes_total = frontend_driver_get_total_memory(); + char mem[128]; + + mem[0] = '\0'; + + snprintf( + mem, sizeof(mem), " || MEM: %.2f/%.2fMB", mem_bytes_used / (1024.0f * 1024.0f), + mem_bytes_total / (1024.0f * 1024.0f)); + strlcat(video_info->fps_text, mem, sizeof(video_info->fps_text)); + } +} + const gfx_ctx_driver_t gfx_ctx_ps3 = { gfx_ctx_ps3_init, gfx_ctx_ps3_destroy, @@ -425,7 +448,7 @@ const gfx_ctx_driver_t gfx_ctx_ps3 = { gfx_ctx_ps3_get_video_output_next, NULL, /* get_metrics */ NULL, - NULL, /* update_title */ + gfx_ctx_ps3_update_window_title, gfx_ctx_ps3_check_window, NULL, /* set_resize */ gfx_ctx_ps3_has_focus, diff --git a/gfx/drivers_context/sixel_ctx.c b/gfx/drivers_context/sixel_ctx.c index 2ed93c08de..59421e1125 100644 --- a/gfx/drivers_context/sixel_ctx.c +++ b/gfx/drivers_context/sixel_ctx.c @@ -50,12 +50,28 @@ static bool gfx_ctx_sixel_set_resize(void *data, static void gfx_ctx_sixel_update_window_title(void *data, void *data2) { + const settings_t *settings = config_get_ptr(); + video_frame_info_t *video_info = (video_frame_info_t*)data2; #if defined(_WIN32) && !defined(_XBOX) const ui_window_t *window = ui_companion_driver_get_window_ptr(); char title[128]; title[0] = '\0'; + if (settings->bools.video_memory_show) + { + uint64_t mem_bytes_used = frontend_driver_get_used_memory(); + uint64_t mem_bytes_total = frontend_driver_get_total_memory(); + char mem[128]; + + mem[0] = '\0'; + + snprintf( + mem, sizeof(mem), " || MEM: %.2f/%.2fMB", mem_bytes_used / (1024.0f * 1024.0f), + mem_bytes_total / (1024.0f * 1024.0f)); + strlcat(video_info->fps_text, mem, sizeof(video_info->fps_text)); + } + video_driver_get_window_title(title, sizeof(title)); if (window && title[0]) diff --git a/gfx/drivers_context/wgl_ctx.c b/gfx/drivers_context/wgl_ctx.c index 0baf837afa..f00696aa79 100644 --- a/gfx/drivers_context/wgl_ctx.c +++ b/gfx/drivers_context/wgl_ctx.c @@ -42,6 +42,7 @@ #include "../../configuration.h" #include "../../dynamic.h" #include "../../verbosity.h" +#include "../../frontend/frontend_driver.h" #include "../video_driver.h" #include "../common/win32_common.h" @@ -475,10 +476,28 @@ static bool gfx_ctx_wgl_set_resize(void *data, static void gfx_ctx_wgl_update_title(void *data, void *data2) { + const settings_t *settings = config_get_ptr(); + video_frame_info_t* video_info = (video_frame_info_t*)data2; char title[128]; title[0] = '\0'; + if (settings->bools.video_memory_show) + { +#ifndef __WINRT__ + uint64_t mem_bytes_used = frontend_driver_get_used_memory(); + uint64_t mem_bytes_total = frontend_driver_get_total_memory(); + char mem[128]; + + mem[0] = '\0'; + + snprintf( + mem, sizeof(mem), " || MEM: %.2f/%.2fMB", mem_bytes_used / (1024.0f * 1024.0f), + mem_bytes_total / (1024.0f * 1024.0f)); + strlcat(video_info->fps_text, mem, sizeof(video_info->fps_text)); +#endif + } + video_driver_get_window_title(title, sizeof(title)); if (title[0])