mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-01-18 08:52:41 +00:00
(Menu) Go through RARCH_CMD_VIDEO_SET_ASPECT_RATIO
This commit is contained in:
parent
45b7663bc1
commit
c34e5428c0
@ -946,8 +946,7 @@ bool rarch_environment_cb(unsigned cmd, void *data)
|
||||
geom->base_width, geom->base_height, geom->aspect_ratio);
|
||||
|
||||
// Forces recomputation of aspect ratios if using core-dependent aspect ratios.
|
||||
if (driver.video_poke && driver.video_poke->set_aspect_ratio && driver.video_data)
|
||||
driver.video_poke->set_aspect_ratio(driver.video_data, g_settings.video.aspect_ratio_idx);
|
||||
rarch_main_command(RARCH_CMD_VIDEO_SET_ASPECT_RATIO);
|
||||
|
||||
// TODO: Figure out what to do, if anything, with recording.
|
||||
}
|
||||
|
@ -1266,9 +1266,8 @@ static int menu_settings_iterate(unsigned action, rarch_setting_t *setting)
|
||||
aspectratio_lut[ASPECT_RATIO_CUSTOM].value = (float)custom->width / custom->height;
|
||||
|
||||
g_settings.video.aspect_ratio_idx = ASPECT_RATIO_CUSTOM;
|
||||
if (driver.video_data && driver.video_poke && driver.video_poke->set_aspect_ratio)
|
||||
driver.video_poke->set_aspect_ratio(driver.video_data,
|
||||
g_settings.video.aspect_ratio_idx);
|
||||
|
||||
rarch_main_command(RARCH_CMD_VIDEO_SET_ASPECT_RATIO);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -222,8 +222,7 @@ bool load_menu_content(void)
|
||||
if (driver.menu_ctx && driver.menu_ctx->backend && driver.menu_ctx->backend->shader_manager_init)
|
||||
driver.menu_ctx->backend->shader_manager_init(driver.menu);
|
||||
|
||||
if (driver.video_data && driver.video_poke && driver.video_poke->set_aspect_ratio)
|
||||
driver.video_poke->set_aspect_ratio(driver.video_data, g_settings.video.aspect_ratio_idx);
|
||||
rarch_main_command(RARCH_CMD_VIDEO_SET_ASPECT_RATIO);
|
||||
|
||||
g_extern.lifecycle_state |= (1ULL << MODE_GAME);
|
||||
|
||||
|
@ -118,6 +118,7 @@ enum basic_event
|
||||
RARCH_CMD_VIDEO_APPLY_STATE_CHANGES,
|
||||
RARCH_CMD_VIDEO_SET_BLOCKING_STATE,
|
||||
RARCH_CMD_VIDEO_SET_NONBLOCKING_STATE,
|
||||
RARCH_CMD_VIDEO_SET_ASPECT_RATIO,
|
||||
};
|
||||
|
||||
enum menu_enums
|
||||
|
@ -3242,6 +3242,10 @@ void rarch_main_command(unsigned action)
|
||||
if (driver.video && driver.video->set_nonblock_state)
|
||||
driver.video->set_nonblock_state(driver.video_data, boolean);
|
||||
break;
|
||||
case RARCH_CMD_VIDEO_SET_ASPECT_RATIO:
|
||||
if (driver.video_data && driver.video_poke && driver.video_poke->set_aspect_ratio)
|
||||
driver.video_poke->set_aspect_ratio(driver.video_data, g_settings.video.aspect_ratio_idx);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1311,9 +1311,7 @@ static void general_write_handler(const void *data)
|
||||
else if (!strcmp(setting->name, "aspect_ratio_index"))
|
||||
{
|
||||
g_settings.video.aspect_ratio_idx = *setting->value.unsigned_integer;
|
||||
|
||||
if (driver.video_data && driver.video_poke && driver.video_poke->set_aspect_ratio)
|
||||
driver.video_poke->set_aspect_ratio(driver.video_data, g_settings.video.aspect_ratio_idx);
|
||||
rarch_cmd = RARCH_CMD_VIDEO_SET_ASPECT_RATIO;
|
||||
}
|
||||
else if (!strcmp(setting->name, "video_message_pos_x"))
|
||||
g_settings.video.msg_pos_x = *setting->value.fraction;
|
||||
|
Loading…
x
Reference in New Issue
Block a user