(Xbox 1) Create more context functions for XDK

This commit is contained in:
twinaphex 2012-08-03 04:39:37 +02:00
parent 7cc14a6c4d
commit dc21864405
4 changed files with 14 additions and 7 deletions

View File

@ -41,7 +41,6 @@
#define video_set_aspect_ratio_func(aspectratio_idx) gfx_ctx_set_aspect_ratio(driver.video_data, aspectratio_idx)
#define gfx_ctx_window_has_focus() (true)
#define gfx_ctx_swap_buffers() (psglSwap())
#define input_init_func() ps3_input_initialize()
#define input_poll_func() ps3_input_poll(driver.input_data)
@ -69,7 +68,6 @@
#define video_set_aspect_ratio_func(aspectratio_idx) gfx_ctx_set_aspect_ratio(driver.video_data, aspectratio_idx)
#define gfx_ctx_window_has_focus() (true)
#define gfx_ctx_swap_buffers() (d3d->d3d_render_device->Present(NULL, NULL, NULL, NULL))
#define input_init_func() xinput_input_init()
#define input_poll_func() xinput_input_poll(driver.input_data)

View File

@ -99,12 +99,12 @@ bool gfx_ctx_window_has_focus(void)
{
return true;
}
#endif
void gfx_ctx_swap_buffers(void)
{
psglSwap();
}
#endif
void gfx_ctx_clear(void)
{

View File

@ -59,13 +59,23 @@ void gfx_ctx_check_window(bool *quit,
void gfx_ctx_set_resize(unsigned width, unsigned height) { }
#ifndef HAVE_GRIFFIN
void gfx_ctx_swap_buffers(void)
{
xdk_d3d_video_t *d3d = (xdk_d3d_video_t*)driver.video_data;
#ifdef _XBOX1
d3d->d3d_render_device->EndScene();
#endif
d3d->d3d_render_device->Present(NULL, NULL, NULL, NULL);
}
void gfx_ctx_clear(void)
{
xdk_d3d_video_t *device_ptr = (xdk_d3d_video_t*)driver.video_data;
device_ptr->d3d_render_device->Clear(0, NULL, D3DCLEAR_TARGET,
D3DCOLOR_ARGB(0, 0, 0, 0), 1.0f, 0);
}
#ifndef HAVE_GRIFFIN
bool gfx_ctx_window_has_focus(void)
{
return true;

View File

@ -991,8 +991,7 @@ void menu_loop(void)
SET_TIMER_EXPIRATION(device_ptr, 30);
}
device_ptr->d3d_render_device->EndScene();
device_ptr->d3d_render_device->Present(NULL, NULL, NULL, NULL);
gfx_ctx_swap_buffers();
}while(g_console.menu_enable);
if(g_console.ingame_menu_enable)