mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-13 22:08:34 +00:00
(360) Build fix
This commit is contained in:
parent
566296068a
commit
0df739b86d
@ -1159,6 +1159,8 @@ void menu_loop(void)
|
|||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
|
g_extern.frame_count++;
|
||||||
|
|
||||||
if(g_extern.console.emulator_initialized)
|
if(g_extern.console.emulator_initialized)
|
||||||
rarch_render_cached_frame();
|
rarch_render_cached_frame();
|
||||||
else
|
else
|
||||||
@ -1172,7 +1174,7 @@ void menu_loop(void)
|
|||||||
|
|
||||||
g_extern.console.rmenu.state.rmenu.enable = !((state.Gamepad.wButtons & XINPUT_GAMEPAD_LEFT_THUMB)
|
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)
|
&& (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;
|
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)))
|
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);
|
const char *message = msg_queue_pull(g_extern.msg_queue);
|
||||||
|
|
||||||
if (message)
|
if (message)
|
||||||
{
|
{
|
||||||
xdk_render_msg(device_ptr, message);
|
device_ptr->font_ctx->render_msg(device_ptr, message);
|
||||||
}
|
}
|
||||||
|
|
||||||
device_ptr->ctx_driver->swap_buffers();
|
device_ptr->ctx_driver->swap_buffers();
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
static const d3d_font_renderer_t *d3d_font_backends[] = {
|
static const d3d_font_renderer_t *d3d_font_backends[] = {
|
||||||
#if defined(_XBOX1)
|
#if defined(_XBOX1)
|
||||||
&d3d_xdk1_font,
|
&d3d_xdk1_font,
|
||||||
#elif defined(_XBOX360
|
#elif defined(_XBOX360)
|
||||||
&d3d_xbox360_font,
|
&d3d_xbox360_font,
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
@ -25,7 +25,7 @@ typedef struct d3d_font_renderer
|
|||||||
void (*deinit)(void *data);
|
void (*deinit)(void *data);
|
||||||
void (*render_msg)(void *data, const char *msg);
|
void (*render_msg)(void *data, const char *msg);
|
||||||
void (*render_msg_place)(void *data, float x, float y,
|
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;
|
const char *ident;
|
||||||
} d3d_font_renderer_t;
|
} d3d_font_renderer_t;
|
||||||
|
|
||||||
|
@ -188,7 +188,7 @@ static bool xdk_init_font(void *data, const char *font_path, unsigned font_size)
|
|||||||
font->m_TranslatorTable = NULL;
|
font->m_TranslatorTable = NULL;
|
||||||
|
|
||||||
// Create the font
|
// Create the font
|
||||||
if(FAILED( m_xprResource.Create(path)))
|
if(FAILED( m_xprResource.Create(font_path)))
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
D3DTexture *pFontTexture = m_xprResource.GetTexture( "FontTexture" );
|
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");
|
RARCH_LOG("Successfully initialized D3D9 HLSL fonts.\n");
|
||||||
return 0;
|
return true;
|
||||||
error:
|
error:
|
||||||
RARCH_ERR("Could not initialize D3D9 HLSL fonts.\n");
|
RARCH_ERR("Could not initialize D3D9 HLSL fonts.\n");
|
||||||
return E_FAIL;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void xdk_deinit_font(void *data)
|
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)
|
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];
|
wchar_t msg[PATH_MAX];
|
||||||
convert_char_to_wchar(msg, str_msg, sizeof(msg));
|
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 x = g_extern.console.rmenu.state.rmenu_hd.enable ? 160 : 100;
|
||||||
float y = 120;
|
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 = {
|
const d3d_font_renderer_t d3d_xbox360_font = {
|
||||||
|
@ -147,9 +147,7 @@ static void xdk_d3d_free(void * data)
|
|||||||
#ifdef HAVE_HLSL
|
#ifdef HAVE_HLSL
|
||||||
hlsl_deinit();
|
hlsl_deinit();
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_D3D9
|
d3d->font_ctx->deinit(d3d);
|
||||||
d3d9_deinit_font();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
d3d->ctx_driver->destroy();
|
d3d->ctx_driver->destroy();
|
||||||
|
|
||||||
@ -818,7 +816,7 @@ static bool xdk_d3d_frame(void *data, const void *frame,
|
|||||||
&& !menu_enabled
|
&& !menu_enabled
|
||||||
#endif
|
#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)
|
if(!d3d->block_swap)
|
||||||
gfx_ctx_xdk_swap_buffers();
|
gfx_ctx_xdk_swap_buffers();
|
||||||
|
Loading…
Reference in New Issue
Block a user