diff --git a/360/xdk360_video.cpp b/360/xdk360_video.cpp index 5853ea4015..2376e7f541 100644 --- a/360/xdk360_video.cpp +++ b/360/xdk360_video.cpp @@ -111,16 +111,15 @@ static void *xdk360_gfx_init(const video_info_t *video, const input_driver_t **i } // Get video settings - XVIDEO_MODE video_mode; - memset(&video_mode, 0, sizeof(video_mode)); + memset(&vid->video_mode, 0, sizeof(vid->video_mode)); - XGetVideoMode(&video_mode); + XGetVideoMode(&vid->video_mode); memset(&vid->d3dpp, 0, sizeof(vid->d3dpp)); - vid->d3dpp.BackBufferWidth = video_mode.fIsHiDef ? 1280 : 640; - vid->d3dpp.BackBufferHeight = video_mode.fIsHiDef ? 720 : 480; + vid->d3dpp.BackBufferWidth = vid->video_mode.fIsHiDef ? 1280 : 640; + vid->d3dpp.BackBufferHeight = vid->video_mode.fIsHiDef ? 720 : 480; vid->d3dpp.BackBufferFormat = (D3DFORMAT)MAKESRGBFMT(D3DFMT_A8R8G8B8); vid->d3dpp.FrontBufferFormat = (D3DFORMAT)MAKESRGBFMT(D3DFMT_LE_X8R8G8B8); vid->d3dpp.MultiSampleType = D3DMULTISAMPLE_NONE; @@ -205,8 +204,8 @@ static void *xdk360_gfx_init(const video_info_t *video, const input_driver_t **i vid->xdk360_render_device->SetRenderState(D3DRS_ZENABLE, FALSE); D3DVIEWPORT9 vp = {0}; - vp.Width = video_mode.fIsHiDef ? 1280 : 640; - vp.Height = video_mode.fIsHiDef ? 720 : 480; + vp.Width = vid->video_mode.fIsHiDef ? 1280 : 640; + vp.Height = vid->video_mode.fIsHiDef ? 720 : 480; vp.MinZ = 0.0f; vp.MaxZ = 1.0f; vid->xdk360_render_device->SetViewport(&vp); diff --git a/360/xdk360_video.h b/360/xdk360_video.h index 645682d881..c5e7fd7e9f 100644 --- a/360/xdk360_video.h +++ b/360/xdk360_video.h @@ -47,6 +47,7 @@ typedef struct xdk360_video IDirect3DTexture9* font_texture; IDirect3DTexture9* lpTexture; D3DPRESENT_PARAMETERS d3dpp; + XVIDEO_MODE video_mode; } xdk360_video_t; #define IS_TIMER_NOT_EXPIRED() (g_frame_count < g_console.timer_expiration_frame_count) diff --git a/360/xdk360_video_console.cpp b/360/xdk360_video_console.cpp index 3443764b03..ee075f0877 100644 --- a/360/xdk360_video_console.cpp +++ b/360/xdk360_video_console.cpp @@ -43,7 +43,8 @@ HRESULT Console::Create( LPCSTR strFontFileName, unsigned long colBackColor, D3DDevice *m_pd3dDevice = vid->xdk360_render_device; // Calculate the safe area - unsigned int uiSafeAreaPct = SAFE_AREA_PCT_HDTV; + unsigned int uiSafeAreaPct = vid->video_mode.fIsHiDef ? SAFE_AREA_PCT_HDTV + : SAFE_AREA_PCT_4x3; m_cxSafeArea = ( vid->d3dpp.BackBufferWidth * uiSafeAreaPct ) / 100; m_cySafeArea = ( vid->d3dpp.BackBufferHeight * uiSafeAreaPct ) / 100;