(360) Build fix

This commit is contained in:
twinaphex 2012-12-15 04:36:19 +01:00
parent 566296068a
commit 0df739b86d
5 changed files with 14 additions and 14 deletions

View File

@ -1159,6 +1159,8 @@ void menu_loop(void)
do
{
g_extern.frame_count++;
if(g_extern.console.emulator_initialized)
rarch_render_cached_frame();
else
@ -1172,7 +1174,7 @@ void menu_loop(void)
g_extern.console.rmenu.state.rmenu.enable = !((state.Gamepad.wButtons & XINPUT_GAMEPAD_LEFT_THUMB)
&& (state.Gamepad.wButtons & XINPUT_GAMEPAD_RIGHT_THUMB) && (g_extern.console.emulator_initialized)
&& IS_TIMER_EXPIRED(device_ptr, 0));
&& IS_TIMER_EXPIRED(0));
g_extern.console.rmenu.mode = g_extern.console.rmenu.state.rmenu.enable ? MODE_MENU : MODE_EMULATION;
@ -1204,14 +1206,14 @@ void menu_loop(void)
if(g_extern.console.rmenu.mode == MODE_EMULATION && !(g_extern.lifecycle_state & (1ULL << RARCH_FRAMEADVANCE)))
{
SET_TIMER_EXPIRATION(device_ptr, 0, 30);
SET_TIMER_EXPIRATION(0, 30);
}
const char *message = msg_queue_pull(g_extern.msg_queue);
if (message)
{
xdk_render_msg(device_ptr, message);
device_ptr->font_ctx->render_msg(device_ptr, message);
}
device_ptr->ctx_driver->swap_buffers();

View File

@ -20,7 +20,7 @@
static const d3d_font_renderer_t *d3d_font_backends[] = {
#if defined(_XBOX1)
&d3d_xdk1_font,
#elif defined(_XBOX360
#elif defined(_XBOX360)
&d3d_xbox360_font,
#endif
};

View File

@ -25,7 +25,7 @@ typedef struct d3d_font_renderer
void (*deinit)(void *data);
void (*render_msg)(void *data, const char *msg);
void (*render_msg_place)(void *data, float x, float y,
float scale, uint32_t color, const char *msg);
float scale, uint32_t color, const char *str_msg);
const char *ident;
} d3d_font_renderer_t;

View File

@ -188,7 +188,7 @@ static bool xdk_init_font(void *data, const char *font_path, unsigned font_size)
font->m_TranslatorTable = NULL;
// Create the font
if(FAILED( m_xprResource.Create(path)))
if(FAILED( m_xprResource.Create(font_path)))
goto error;
D3DTexture *pFontTexture = m_xprResource.GetTexture( "FontTexture" );
@ -233,10 +233,10 @@ static bool xdk_init_font(void *data, const char *font_path, unsigned font_size)
}
RARCH_LOG("Successfully initialized D3D9 HLSL fonts.\n");
return 0;
return true;
error:
RARCH_ERR("Could not initialize D3D9 HLSL fonts.\n");
return E_FAIL;
return false;
}
static void xdk_deinit_font(void *data)
@ -430,7 +430,7 @@ static void xdk_video_font_draw_text(xdk360_video_font_t *font,
static void xdk_render_msg_place(void *data, float x, float y, float scale, uint32_t color, const char *str_msg)
{
xdk_d3d_video_t *vid = (xdk_d3d_video_t*)data;
(void)data;
wchar_t msg[PATH_MAX];
convert_char_to_wchar(msg, str_msg, sizeof(msg));
@ -450,7 +450,7 @@ static void xdk_render_msg(void *driver, const char *msg)
float x = g_extern.console.rmenu.state.rmenu_hd.enable ? 160 : 100;
float y = 120;
xdk_render_msg_place(d3d, x, y, msg);
xdk_render_msg_place(d3d, x, y, 0, 0, msg);
}
const d3d_font_renderer_t d3d_xbox360_font = {

View File

@ -147,9 +147,7 @@ static void xdk_d3d_free(void * data)
#ifdef HAVE_HLSL
hlsl_deinit();
#endif
#ifdef HAVE_D3D9
d3d9_deinit_font();
#endif
d3d->font_ctx->deinit(d3d);
d3d->ctx_driver->destroy();
@ -818,7 +816,7 @@ static bool xdk_d3d_frame(void *data, const void *frame,
&& !menu_enabled
#endif
)
d3d->font_ctx->render_msg_place(d3d, msg_width, msg_height, 0, 0, msg); //TODO: dehardcode x/y here for HD (720p) mode
d3d->font_ctx->render_msg_place(d3d, msg_width, msg_height, 0.0f, 0, msg); //TODO: dehardcode x/y here for HD (720p) mode
if(!d3d->block_swap)
gfx_ctx_xdk_swap_buffers();