mirror of
https://github.com/libretro/RetroArch
synced 2025-04-09 21:45:45 +00:00
Refactoring (get_rotation)
This commit is contained in:
parent
9df755bdb4
commit
ba183cf7a6
13
retroarch.c
13
retroarch.c
@ -18653,7 +18653,7 @@ static void video_driver_set_viewport_square_pixel(void)
|
|||||||
highest = i;
|
highest = i;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((configuration_settings->uints.video_rotation + runloop_system.rotation) % 4) {
|
if (get_rotation() % 4) {
|
||||||
aspect_x = height / highest;
|
aspect_x = height / highest;
|
||||||
aspect_y = width / highest;
|
aspect_y = width / highest;
|
||||||
} else {
|
} else {
|
||||||
@ -18674,7 +18674,6 @@ static bool video_driver_init_internal(bool *video_is_threaded)
|
|||||||
unsigned max_dim, scale, width, height;
|
unsigned max_dim, scale, width, height;
|
||||||
video_viewport_t *custom_vp = NULL;
|
video_viewport_t *custom_vp = NULL;
|
||||||
input_driver_t *tmp = NULL;
|
input_driver_t *tmp = NULL;
|
||||||
rarch_system_info_t *system = NULL;
|
|
||||||
static uint16_t dummy_pixels[32] = {0};
|
static uint16_t dummy_pixels[32] = {0};
|
||||||
settings_t *settings = configuration_settings;
|
settings_t *settings = configuration_settings;
|
||||||
struct retro_game_geometry *geom = &video_driver_av_info.geometry;
|
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);
|
video_driver_get_viewport_info(custom_vp);
|
||||||
}
|
}
|
||||||
|
|
||||||
system = &runloop_system;
|
video_driver_set_rotation(get_rotation() % 4);
|
||||||
|
|
||||||
video_driver_set_rotation(
|
|
||||||
(settings->uints.video_rotation + system->rotation) % 4);
|
|
||||||
|
|
||||||
current_video->suppress_screensaver(video_driver_data,
|
current_video->suppress_screensaver(video_driver_data,
|
||||||
settings->bools.ui_suspend_screensaver_enable);
|
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->data = NULL;
|
||||||
dest->meta = NULL;
|
dest->meta = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
unsigned get_rotation()
|
||||||
|
{
|
||||||
|
return configuration_settings->uints.video_rotation + runloop_system.rotation;
|
||||||
|
}
|
||||||
|
@ -2133,6 +2133,8 @@ bool menu_driver_is_toggled(void);
|
|||||||
|
|
||||||
bool menu_widgets_ready(void);
|
bool menu_widgets_ready(void);
|
||||||
|
|
||||||
|
unsigned get_rotation();
|
||||||
|
|
||||||
RETRO_END_DECLS
|
RETRO_END_DECLS
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user