Refactoring (get_rotation)

This commit is contained in:
Rémi 2019-11-16 23:03:15 +01:00
parent 9df755bdb4
commit ba183cf7a6
2 changed files with 9 additions and 6 deletions

View File

@ -18653,7 +18653,7 @@ static void video_driver_set_viewport_square_pixel(void)
highest = i;
}
if ((configuration_settings->uints.video_rotation + runloop_system.rotation) % 4) {
if (get_rotation() % 4) {
aspect_x = height / highest;
aspect_y = width / highest;
} else {
@ -18674,7 +18674,6 @@ static bool video_driver_init_internal(bool *video_is_threaded)
unsigned max_dim, scale, width, height;
video_viewport_t *custom_vp = NULL;
input_driver_t *tmp = NULL;
rarch_system_info_t *system = NULL;
static uint16_t dummy_pixels[32] = {0};
settings_t *settings = configuration_settings;
struct retro_game_geometry *geom = &video_driver_av_info.geometry;
@ -18834,10 +18833,7 @@ static bool video_driver_init_internal(bool *video_is_threaded)
video_driver_get_viewport_info(custom_vp);
}
system = &runloop_system;
video_driver_set_rotation(
(settings->uints.video_rotation + system->rotation) % 4);
video_driver_set_rotation(get_rotation() % 4);
current_video->suppress_screensaver(video_driver_data,
settings->bools.ui_suspend_screensaver_enable);
@ -27446,3 +27442,8 @@ static void core_free_retro_game_info(struct retro_game_info *dest)
dest->data = NULL;
dest->meta = NULL;
}
unsigned get_rotation()
{
return configuration_settings->uints.video_rotation + runloop_system.rotation;
}

View File

@ -2133,6 +2133,8 @@ bool menu_driver_is_toggled(void);
bool menu_widgets_ready(void);
unsigned get_rotation();
RETRO_END_DECLS
#endif