(WiiU) enable libretrodb.

This commit is contained in:
aliaspider 2017-05-22 06:07:27 +01:00
parent eede1a4978
commit 634de19dc9
5 changed files with 17 additions and 6 deletions

View File

@ -37,7 +37,7 @@ ifeq ($(GRIFFIN_BUILD), 1)
OBJ += griffin/griffin.o
DEFINES += -DHAVE_GRIFFIN=1 -DHAVE_MENU -DHAVE_RGUI -DHAVE_LIBRETRODB
DEFINES += -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_RBMP -DHAVE_RTGA -DWANT_ZLIB -DHAVE_CC_RESAMPLER
DEFINES += -DHAVE_STB_FONT -DHAVE_LANGEXTRA
DEFINES += -DHAVE_STB_FONT -DHAVE_LANGEXTRA -DHAVE_LIBRETRODB
# DEFINES += -DHAVE_FREETYPE
DEFINES += -DHAVE_XMB -DHAVE_MATERIALUI
else
@ -57,6 +57,7 @@ else
HAVE_STB_FONT = 1
# HAVE_FREETYPE = 1
HAVE_LANGEXTRA = 1
HAVE_LIBRETRODB = 1
include Makefile.common
BLACKLIST :=

View File

@ -88,5 +88,6 @@ typedef struct
unsigned rotation;
bool keep_aspect;
bool should_resize;
bool render_msg_enabled;
} wiiu_video_t;

View File

@ -542,10 +542,10 @@ static bool wiiu_gfx_frame(void* data, const void* frame,
#if 0
static u32 last_frame_tick;
if (!(wiiu->menu.enable))
printf("\r frame time : %10.6f ms \n", (float)(currentTick - last_frame_tick) * 1000.0f / (float)wiiu_timer_clock);
printf("frame time : %10.6f ms \r", (float)(currentTick - last_frame_tick) * 1000.0f / (float)wiiu_timer_clock);
last_frame_tick = currentTick;
#endif
printf("\rfps: %8.8f frames : %5i", fps, wiiu->frames++);
printf("fps: %8.8f frames : %5i\r", fps, wiiu->frames++);
fflush(stdout);
if (wiiu->should_resize)
@ -625,12 +625,16 @@ static bool wiiu_gfx_frame(void* data, const void* frame,
GX2SetAttribBuffer(1, wiiu->vertex_cache.size * sizeof(tex_coord_t), sizeof(tex_coord_t), wiiu->vertex_cache.tex_coords);
GX2SetPixelSampler(&wiiu->sampler_linear, wiiu->shader->sampler.location);
wiiu->render_msg_enabled = true;
if (wiiu->menu.enable)
menu_driver_frame(video_info);
if (msg)
font_driver_render_msg(video_info, NULL, msg, NULL);
wiiu->render_msg_enabled = false;
GX2Invalidate(GX2_INVALIDATE_MODE_CPU_ATTRIBUTE_BUFFER, wiiu->vertex_cache.positions, wiiu->vertex_cache.current * sizeof(position_t));
GX2Invalidate(GX2_INVALIDATE_MODE_CPU_ATTRIBUTE_BUFFER, wiiu->vertex_cache.tex_coords, wiiu->vertex_cache.current * sizeof(tex_coord_t));
@ -827,7 +831,12 @@ static void wiiu_gfx_set_osd_msg(void* data,
wiiu_video_t* wiiu = (wiiu_video_t*)data;
if (wiiu)
font_driver_render_msg(video_info, font, msg, params);
{
if (wiiu->render_msg_enabled)
font_driver_render_msg(video_info, font, msg, params);
else
printf("OSD msg: %s\n", msg);
}
}

View File

@ -79,7 +79,7 @@ typedef int ssize_t;
#define STRING_REP_INT64 "%I64u"
#define STRING_REP_UINT64 "%I64u"
#define STRING_REP_ULONG "%Iu"
#elif defined(__STDC_VERSION__) && __STDC_VERSION__>=199901L && !defined(VITA)
#elif defined(__STDC_VERSION__) && __STDC_VERSION__>=199901L && !defined(VITA) && !defined(WIIU)
#define STRING_REP_INT64 "%llu"
#define STRING_REP_UINT64 "%llu"
#define STRING_REP_ULONG "%zu"

View File

@ -108,7 +108,7 @@ static int task_database_iterate_start(database_info_handle_t *db,
snprintf(msg, sizeof(msg),
STRING_REP_ULONG "/" STRING_REP_ULONG ": %s %s...\n",
#if defined(_WIN32) || defined(__STDC_VERSION__) && __STDC_VERSION__>=199901L && !defined(VITA)
#if defined(_WIN32) || defined(__STDC_VERSION__) && __STDC_VERSION__>=199901L && !defined(VITA) &&!defined(WIIU)
db->list_ptr,
db->list->size,
#else