(D3D10/12) Add menu widgets support - text offset is wrong

This commit is contained in:
twinaphex 2019-02-07 01:40:15 +01:00
parent b0dcbdc15e
commit 4b2fdfad48
2 changed files with 46 additions and 1 deletions

View File

@ -34,6 +34,9 @@
#include "../common/d3dcompiler_common.h"
#ifdef HAVE_MENU
#include "../../menu/menu_driver.h"
#ifdef HAVE_MENU_WIDGETS
#include "../../menu/widgets/menu_widgets.h"
#endif
#endif
#ifdef __WINRT__
@ -1401,6 +1404,12 @@ static bool d3d10_gfx_frame(
}
#endif
#ifdef HAVE_MENU
#ifdef HAVE_MENU_WIDGETS
menu_widgets_frame(video_info);
#endif
#endif
if (msg && *msg)
{
D3D10SetViewports(d3d10->device, 1, &d3d10->viewport);
@ -1667,6 +1676,14 @@ static void d3d10_gfx_get_poke_interface(void* data, const video_poke_interface_
*iface = &d3d10_poke_interface;
}
#if defined(HAVE_MENU) && defined(HAVE_MENU_WIDGETS)
static bool d3d10_menu_widgets_enabled(void *data)
{
(void)data;
return true;
}
#endif
video_driver_t video_d3d10 = {
d3d10_gfx_init,
d3d10_gfx_frame,
@ -1688,4 +1705,8 @@ video_driver_t video_d3d10 = {
d3d10_get_overlay_interface,
#endif
d3d10_gfx_get_poke_interface,
NULL, /* d3d10_wrap_type_to_enum */
#if defined(HAVE_MENU) && defined(HAVE_MENU_WIDGETS)
d3d10_menu_widgets_enabled
#endif
};

View File

@ -28,12 +28,18 @@
#include "../common/d3d12_common.h"
#include "../common/d3dcompiler_common.h"
#include "../../menu/menu_driver.h"
#include "../../driver.h"
#include "../../verbosity.h"
#include "../../configuration.h"
#include "../../retroarch.h"
#ifdef HAVE_MENU
#include "../../menu/menu_driver.h"
#ifdef HAVE_MENU_WIDGETS
#include "../../menu/widgets/menu_widgets.h"
#endif
#endif
#include "wiiu/wiiu_dbg.h"
static void d3d12_gfx_sync(d3d12_video_t* d3d12)
@ -1531,6 +1537,12 @@ static bool d3d12_gfx_frame(
}
#endif
#ifdef HAVE_MENU
#ifdef HAVE_MENU_WIDGETS
menu_widgets_frame(video_info);
#endif
#endif
if (msg && *msg)
{
D3D12SetPipelineState(d3d12->queue.cmd, d3d12->sprites.pipe_blend);
@ -1816,6 +1828,14 @@ static void d3d12_gfx_get_poke_interface(void* data, const video_poke_interface_
*iface = &d3d12_poke_interface;
}
#if defined(HAVE_MENU) && defined(HAVE_MENU_WIDGETS)
static bool d3d12_menu_widgets_enabled(void *data)
{
(void)data;
return true;
}
#endif
video_driver_t video_d3d12 = {
d3d12_gfx_init,
d3d12_gfx_frame,
@ -1837,4 +1857,8 @@ video_driver_t video_d3d12 = {
d3d12_get_overlay_interface,
#endif
d3d12_gfx_get_poke_interface,
NULL, /* d3d12_wrap_type_to_enum */
#if defined(HAVE_MENU) && defined(HAVE_MENU_WIDGETS)
d3d12_menu_widgets_enabled
#endif
};