From ab4ca8cf1b41eb5bdafc91bfdafd4cd27434ff59 Mon Sep 17 00:00:00 2001 From: Ash Logan Date: Mon, 3 Jun 2019 20:35:46 +1000 Subject: [PATCH 1/3] (GX2) Use correct menu coordinates to render menu --- gfx/drivers/gx2_gfx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gfx/drivers/gx2_gfx.c b/gfx/drivers/gx2_gfx.c index 619d7796ed..ba6ff40d84 100644 --- a/gfx/drivers/gx2_gfx.c +++ b/gfx/drivers/gx2_gfx.c @@ -1681,8 +1681,8 @@ static void wiiu_gfx_set_texture_frame(void *data, const void *frame, bool rgb32 wiiu->menu.v->pos.height = height; wiiu->menu.v->coord.u = 0.0f; wiiu->menu.v->coord.v = 0.0f; - wiiu->menu.v->coord.width = (float)width / wiiu->texture.surface.width; - wiiu->menu.v->coord.height = (float)height / wiiu->texture.surface.height; + wiiu->menu.v->coord.width = (float)width / wiiu->menu.texture.surface.width; + wiiu->menu.v->coord.height = (float)height / wiiu->menu.texture.surface.height; GX2Invalidate(GX2_INVALIDATE_MODE_CPU_ATTRIBUTE_BUFFER, wiiu->menu.v, 4 * sizeof(*wiiu->menu.v)); } From 3461955daee322bdba7f5c433fe6cf25eb1e159b Mon Sep 17 00:00:00 2001 From: Ash Logan Date: Mon, 3 Jun 2019 21:38:40 +1000 Subject: [PATCH 2/3] (GX2) Scale menu to viewport size --- gfx/drivers/gx2_gfx.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gfx/drivers/gx2_gfx.c b/gfx/drivers/gx2_gfx.c index ba6ff40d84..a5136f9010 100644 --- a/gfx/drivers/gx2_gfx.c +++ b/gfx/drivers/gx2_gfx.c @@ -1675,10 +1675,10 @@ static void wiiu_gfx_set_texture_frame(void *data, const void *frame, bool rgb32 GX2Invalidate(GX2_INVALIDATE_MODE_CPU_TEXTURE, wiiu->menu.texture.surface.image, wiiu->menu.texture.surface.imageSize); - wiiu->menu.v->pos.x = 0.0f; - wiiu->menu.v->pos.y = 0.0f; - wiiu->menu.v->pos.width = width; - wiiu->menu.v->pos.height = height; + wiiu->menu.v->pos.x = wiiu->vp.x; + wiiu->menu.v->pos.y = wiiu->vp.y; + wiiu->menu.v->pos.width = wiiu->vp.width; + wiiu->menu.v->pos.height = wiiu->vp.height; wiiu->menu.v->coord.u = 0.0f; wiiu->menu.v->coord.v = 0.0f; wiiu->menu.v->coord.width = (float)width / wiiu->menu.texture.surface.width; From 3d40a3bcaf4f2b210b9b67ddf5ee51feb69dacdf Mon Sep 17 00:00:00 2001 From: Ash Logan Date: Mon, 3 Jun 2019 21:41:03 +1000 Subject: [PATCH 3/3] (GX2) Respect filtering settings for menu --- gfx/drivers/gx2_gfx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gfx/drivers/gx2_gfx.c b/gfx/drivers/gx2_gfx.c index a5136f9010..d4db9572cf 100644 --- a/gfx/drivers/gx2_gfx.c +++ b/gfx/drivers/gx2_gfx.c @@ -1334,7 +1334,8 @@ static bool wiiu_gfx_frame(void *data, const void *frame, GX2SetAttribBuffer(0, 4 * sizeof(*wiiu->menu.v), sizeof(*wiiu->menu.v), wiiu->menu.v); GX2SetPixelTexture(&wiiu->menu.texture, sprite_shader.ps.samplerVars[0].location); - GX2SetPixelSampler(&wiiu->sampler_linear[RARCH_WRAP_DEFAULT], + GX2SetPixelSampler(wiiu->smooth ? &wiiu->sampler_linear[RARCH_WRAP_DEFAULT] : + &wiiu->sampler_nearest[RARCH_WRAP_DEFAULT], sprite_shader.ps.samplerVars[0].location); GX2DrawEx(GX2_PRIMITIVE_MODE_POINTS, 1, 0, 1);