(Xbox 1) Build fixes

This commit is contained in:
twinaphex 2012-11-19 05:00:38 +01:00
parent 52f52bc253
commit 05b552e5a4
2 changed files with 14 additions and 11 deletions

View File

@ -20,6 +20,8 @@
#include "../../xdk/xdk_d3d.h" #include "../../xdk/xdk_d3d.h"
#endif #endif
#include "../image.h"
#include <stdint.h> #include <stdint.h>
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
@ -31,6 +33,7 @@
#include "../../screenshot.h" #include "../../screenshot.h"
#if defined(_XBOX1) #if defined(_XBOX1)
#include "../fonts/xdk1_xfonts.h"
// for Xbox 1 // for Xbox 1
#define XBOX_PRESENTATIONINTERVAL D3DRS_PRESENTATIONINTERVAL #define XBOX_PRESENTATIONINTERVAL D3DRS_PRESENTATIONINTERVAL
#else #else
@ -161,7 +164,7 @@ static bool gfx_ctx_xdk_menu_init(void)
ypos = width == 640 ? 430 : 670; ypos = width == 640 ? 430 : 670;
#endif #endif
rmenu_inited = false; rmenu_inited = true;
return true; return true;
} }
@ -271,8 +274,8 @@ static void gfx_ctx_xdk_menu_set_default_pos(rmenu_default_positions_t *position
static void gfx_ctx_xdk_menu_render_msg(float xpos, float ypos, float scale, unsigned color, const char *msg, ...) static void gfx_ctx_xdk_menu_render_msg(float xpos, float ypos, float scale, unsigned color, const char *msg, ...)
{ {
#ifdef _XBOX1 #ifdef _XBOX1
xdk_d3d_video_t *d3d = (xdk_d3d_video_t*)driver.video_data; xdk_d3d_video_t *device_ptr = (xdk_d3d_video_t*)driver.video_data;
xfonts_render_msg_place(d3d, xpos, ypos, scale, msg); xfonts_render_msg_place(device_ptr, xpos, ypos, scale, msg);
#endif #endif
} }
@ -325,7 +328,7 @@ static void gfx_ctx_xdk_update_window_title(bool reset) { }
static void gfx_ctx_xdk_get_video_size(unsigned *width, unsigned *height) static void gfx_ctx_xdk_get_video_size(unsigned *width, unsigned *height)
{ {
xdk_d3d_video_t *d3d = (xdk_d3d_video_t*)driver.video_data; xdk_d3d_video_t *device_ptr = (xdk_d3d_video_t*)driver.video_data;
#if defined(_XBOX360) #if defined(_XBOX360)
XVIDEO_MODE video_mode; XVIDEO_MODE video_mode;
XGetVideoMode(&video_mode); XGetVideoMode(&video_mode);
@ -342,9 +345,9 @@ static void gfx_ctx_xdk_get_video_size(unsigned *width, unsigned *height)
if(XGetVideoStandard() == XC_VIDEO_STANDARD_PAL_I) if(XGetVideoStandard() == XC_VIDEO_STANDARD_PAL_I)
{ {
// Check for 16:9 mode (PAL REGION) // Check for 16:9 mode (PAL REGION)
if(d3d->video_mode & XC_VIDEO_FLAGS_WIDESCREEN) if(device_ptr->video_mode & XC_VIDEO_FLAGS_WIDESCREEN)
{ {
if(d3d->video_mode & XC_VIDEO_FLAGS_PAL_60Hz) if(device_ptr->video_mode & XC_VIDEO_FLAGS_PAL_60Hz)
{ //60 Hz, 720x480i { //60 Hz, 720x480i
*width = 720; *width = 720;
*height = 480; *height = 480;
@ -359,7 +362,7 @@ static void gfx_ctx_xdk_get_video_size(unsigned *width, unsigned *height)
else else
{ {
// Check for 16:9 mode (NTSC REGIONS) // Check for 16:9 mode (NTSC REGIONS)
if(d3d->video_mode & XC_VIDEO_FLAGS_WIDESCREEN) if(device_ptr->video_mode & XC_VIDEO_FLAGS_WIDESCREEN)
{ {
*width = 720; *width = 720;
*height = 480; *height = 480;
@ -368,17 +371,17 @@ static void gfx_ctx_xdk_get_video_size(unsigned *width, unsigned *height)
if(XGetAVPack() == XC_AV_PACK_HDTV) if(XGetAVPack() == XC_AV_PACK_HDTV)
{ {
if(d3d->video_mode & XC_VIDEO_FLAGS_HDTV_480p) if(device_ptr->video_mode & XC_VIDEO_FLAGS_HDTV_480p)
{ {
*width = 640; *width = 640;
*height = 480; *height = 480;
} }
else if(d3d->video_mode & XC_VIDEO_FLAGS_HDTV_720p) else if(device_ptr->video_mode & XC_VIDEO_FLAGS_HDTV_720p)
{ {
*width = 1280; *width = 1280;
*height = 720; *height = 720;
} }
else if(d3d->video_mode & XC_VIDEO_FLAGS_HDTV_1080i) else if(device_ptr->video_mode & XC_VIDEO_FLAGS_HDTV_1080i)
{ {
*width = 1920; *width = 1920;
*height = 1080; *height = 1080;

View File

@ -341,7 +341,7 @@ static void *xdk_d3d_init(const video_info_t *video, const input_driver_t **inpu
d3d->vsync = video->vsync; d3d->vsync = video->vsync;
#if defined(_XBOX1) #if defined(_XBOX1)
d3d->driver = gfx_ctx_init_first(GFX_CTX_DIRECT3D8_API); d3d->ctx_driver = gfx_ctx_init_first(GFX_CTX_DIRECT3D8_API);
#elif defined(_XBOX360) #elif defined(_XBOX360)
d3d->ctx_driver = gfx_ctx_init_first(GFX_CTX_DIRECT3D9_API); d3d->ctx_driver = gfx_ctx_init_first(GFX_CTX_DIRECT3D9_API);
#endif #endif