Get rid of video_driver_height dependency

This commit is contained in:
twinaphex 2020-03-05 22:03:58 +01:00
parent 52fae101e8
commit 534f09373e
3 changed files with 3 additions and 9 deletions

View File

@ -390,13 +390,11 @@ static void gl2_set_viewport(gl_t *gl,
{
gfx_ctx_aspect_t aspect_data;
settings_t *settings = config_get_ptr();
unsigned height = 0;
unsigned height = gl->video_height;
int x = 0;
int y = 0;
float device_aspect = (float)viewport_width / viewport_height;
video_driver_get_size(NULL, &height);
aspect_data.aspect = &device_aspect;
aspect_data.width = viewport_width;
aspect_data.height = viewport_height;

View File

@ -472,13 +472,11 @@ void gl1_gfx_set_viewport(gl1_t *gl1,
{
gfx_ctx_aspect_t aspect_data;
settings_t *settings = config_get_ptr();
unsigned height = 0;
unsigned height = gl1->video_height;
int x = 0;
int y = 0;
float device_aspect = (float)viewport_width / viewport_height;
video_driver_get_size(NULL, &height);
aspect_data.aspect = &device_aspect;
aspect_data.width = viewport_width;
aspect_data.height = viewport_height;

View File

@ -767,14 +767,12 @@ static void gl_core_set_viewport(gl_core_t *gl,
bool force_full, bool allow_rotate)
{
gfx_ctx_aspect_t aspect_data;
unsigned height = 0;
unsigned height = gl->video_height;
int x = 0;
int y = 0;
settings_t *settings = config_get_ptr();
float device_aspect = (float)viewport_width / viewport_height;
video_driver_get_size(NULL, &height);
aspect_data.aspect = &device_aspect;
aspect_data.width = viewport_width;
aspect_data.height = viewport_height;