mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-01-20 18:02:12 +00:00
(360) Some cleanups
This commit is contained in:
parent
36309050c4
commit
98f30469eb
@ -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);
|
||||
|
@ -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)
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user