Skip to content

Commit

Permalink
(WiiU/GX2) Add widget support (untested)
Browse files Browse the repository at this point in the history
  • Loading branch information
inactive123 committed Feb 7, 2019
1 parent f49b6e2 commit 715ddf1
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions gfx/drivers/gx2_gfx.c
Expand Up @@ -32,6 +32,9 @@

#ifdef HAVE_MENU
#include "../../menu/menu_driver.h"
#ifdef HAVE_MENU_WIDGETS
#include "../../menu/widgets/menu_widgets.h"
#endif
#endif

#include "gfx/common/gx2_common.h"
Expand Down Expand Up @@ -1011,8 +1014,8 @@ static void wiiu_gfx_update_uniform_block(wiiu_video_t *wiiu, int pass, float *u
}

static bool wiiu_gfx_frame(void *data, const void *frame,
unsigned width, unsigned height, uint64_t frame_count,
unsigned pitch, const char *msg, video_frame_info_t *video_info)
unsigned width, unsigned height, uint64_t frame_count,
unsigned pitch, const char *msg, video_frame_info_t *video_info)
{
#if 0
static float fps;
Expand Down Expand Up @@ -1343,6 +1346,12 @@ static bool wiiu_gfx_frame(void *data, const void *frame,
}
}

#ifdef HAVE_MENU
#ifdef HAVE_MENU_WIDGETS
menu_widgets_frame(video_info);
#endif
#endif

if (msg)
font_driver_render_msg(video_info, NULL, msg, NULL);

Expand Down Expand Up @@ -1730,6 +1739,14 @@ static void wiiu_gfx_get_poke_interface(void *data,
*iface = &wiiu_poke_interface;
}

#if defined(HAVE_MENU) && defined(HAVE_MENU_WIDGETS)
static bool wiiu_menu_widgets_enabled(void *data)
{
(void)data;
return true;
}
#endif

video_driver_t video_wiiu =
{
wiiu_gfx_init,
Expand All @@ -1752,4 +1769,7 @@ video_driver_t video_wiiu =
#endif
wiiu_gfx_get_poke_interface,
NULL, /* wrap_type_to_enum */
#if defined(HAVE_MENU) && defined(HAVE_MENU_WIDGETS)
wiiu_menu_widgets_enabled
#endif
};

1 comment on commit 715ddf1

@MarceloMachadoxD
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What it do exactly??

Please sign in to comment.