mirror of
https://github.com/libretro/RetroArch
synced 2025-04-11 00:44:20 +00:00
Refactor more usage of global->video_data.width/global->video_data.height
This commit is contained in:
parent
b99ae6f4e4
commit
3d5abae2b9
@ -128,27 +128,28 @@ static bool renderchain_create_first_pass(void *data,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void renderchain_set_vertices(void *data, unsigned pass,
|
static void renderchain_set_vertices(void *data, unsigned pass,
|
||||||
unsigned width, unsigned height, uint64_t frame_count)
|
unsigned vert_width, unsigned vert_height, uint64_t frame_count)
|
||||||
{
|
{
|
||||||
|
unsigned width, height;
|
||||||
d3d_video_t *d3d = (d3d_video_t*)data;
|
d3d_video_t *d3d = (d3d_video_t*)data;
|
||||||
runloop_t *runloop = rarch_main_get_ptr();
|
xdk_renderchain_t *chain = d3d ? (xdk_renderchain_t*)d3d->renderchain_data : NULL;
|
||||||
global_t *global = global_get_ptr();
|
|
||||||
xdk_renderchain_t *chain = (xdk_renderchain_t*)d3d->renderchain_data;
|
|
||||||
|
|
||||||
if (chain->last_width != width || chain->last_height != height)
|
video_driver_get_size(&width, &height);
|
||||||
|
|
||||||
|
if (chain->last_width != vert_width || chain->last_height != vert_height)
|
||||||
{
|
{
|
||||||
unsigned i;
|
unsigned i;
|
||||||
Vertex vert[4];
|
Vertex vert[4];
|
||||||
void *verts = NULL;
|
void *verts = NULL;
|
||||||
|
|
||||||
chain->last_width = width;
|
chain->last_width = vert_width;
|
||||||
chain->last_height = height;
|
chain->last_height = vert_height;
|
||||||
|
|
||||||
float tex_w = width;
|
float tex_w = vert_width;
|
||||||
float tex_h = height;
|
float tex_h = vert_height;
|
||||||
#ifdef _XBOX360
|
#ifdef _XBOX360
|
||||||
tex_w /= ((float)chain->tex_w);
|
tex_w /= ((float)chain->tex_w);
|
||||||
tex_h /= ((float)chain->tex_h);
|
tex_h /= ((float)chain->tex_h);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
vert[0].x = -1.0f;
|
vert[0].x = -1.0f;
|
||||||
@ -208,13 +209,12 @@ static void renderchain_set_vertices(void *data, unsigned pass,
|
|||||||
#ifdef _XBOX
|
#ifdef _XBOX
|
||||||
if (d3d->shader)
|
if (d3d->shader)
|
||||||
{
|
{
|
||||||
renderchain_set_mvp(d3d, global->video_data.width, global->video_data.height, d3d->dev_rotation);
|
renderchain_set_mvp(d3d, width, height, d3d->dev_rotation);
|
||||||
if (d3d->shader->use)
|
if (d3d->shader->use)
|
||||||
d3d->shader->use(d3d, pass);
|
d3d->shader->use(d3d, pass);
|
||||||
if (d3d->shader->set_params)
|
if (d3d->shader->set_params)
|
||||||
d3d->shader->set_params(d3d, width, height, chain->tex_w,
|
d3d->shader->set_params(d3d, vert_width, vert_height, chain->tex_w,
|
||||||
chain->tex_h, global->video_data.width,
|
chain->tex_h, width, height, frame_count, NULL, NULL, NULL, 0);
|
||||||
global->video_data.height, frame_count, NULL, NULL, NULL, 0);
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user