(XDK) More refactors

This commit is contained in:
twinaphex 2015-05-20 01:51:14 +02:00
parent 0bf3cf97e7
commit 629ff05499
1 changed files with 5 additions and 2 deletions

View File

@ -315,6 +315,7 @@ static bool xdk_renderchain_init(void *data,
unsigned fmt unsigned fmt
) )
{ {
unsigned width, height;
d3d_video_t *d3d = (d3d_video_t*)data; d3d_video_t *d3d = (d3d_video_t*)data;
LPDIRECT3DDEVICE d3dr = (LPDIRECT3DDEVICE)d3d->dev; LPDIRECT3DDEVICE d3dr = (LPDIRECT3DDEVICE)d3d->dev;
global_t *global = global_get_ptr(); global_t *global = global_get_ptr();
@ -324,6 +325,8 @@ static bool xdk_renderchain_init(void *data,
(void)final_viewport_data; (void)final_viewport_data;
(void)fmt; (void)fmt;
video_driver_get_size(&width, &height);
chain->dev = (LPDIRECT3DDEVICE)dev_data; chain->dev = (LPDIRECT3DDEVICE)dev_data;
//chain->video_info = video_info; //chain->video_info = video_info;
chain->pixel_size = (fmt == RETRO_PIXEL_FORMAT_RGB565) ? 2 : 4; chain->pixel_size = (fmt == RETRO_PIXEL_FORMAT_RGB565) ? 2 : 4;
@ -334,10 +337,10 @@ static bool xdk_renderchain_init(void *data,
return false; return false;
if (global->console.screen.viewports.custom_vp.width == 0) if (global->console.screen.viewports.custom_vp.width == 0)
global->console.screen.viewports.custom_vp.width = global->video_data.width; global->console.screen.viewports.custom_vp.width = width;
if (global->console.screen.viewports.custom_vp.height == 0) if (global->console.screen.viewports.custom_vp.height == 0)
global->console.screen.viewports.custom_vp.height = global->video_data.height; global->console.screen.viewports.custom_vp.height = height;
return true; return true;
} }