Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[draft] / [don't merge] Add support for scale_to = original in slang … #15937

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 10 additions & 0 deletions gfx/drivers/gl2.c
Copy link
Author

@kokoko3k kokoko3k Nov 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hope I did right to use width and height instead of gl->tex_w and gl->tex_h

Original file line number Diff line number Diff line change
Expand Up @@ -1817,6 +1817,11 @@ static void gl2_renderchain_recompute_pass_sizes(

switch (fbo_scale->type_x)
{
case RARCH_SCALE_ORIGINAL:
fbo_rect->img_width = fbo_scale->scale_x * width;
fbo_rect->max_img_width = last_max_width * fbo_scale->scale_x;
break;

case RARCH_SCALE_INPUT:
fbo_rect->img_width = fbo_scale->scale_x * last_width;
fbo_rect->max_img_width = last_max_width * fbo_scale->scale_x;
Expand All @@ -1841,6 +1846,11 @@ static void gl2_renderchain_recompute_pass_sizes(

switch (fbo_scale->type_y)
{
case RARCH_SCALE_ORIGINAL:
fbo_rect->img_height = last_height * height;
fbo_rect->max_img_height = last_max_height * fbo_scale->scale_y;
break;

case RARCH_SCALE_INPUT:
fbo_rect->img_height = last_height * fbo_scale->scale_y;
fbo_rect->max_img_height = last_max_height * fbo_scale->scale_y;
Expand Down