Adding to get_video_output_size 2 parameters for additional info

This commit is contained in:
Francisco Javier Trujillo Mata 2021-09-07 20:25:22 +02:00
parent 216675919b
commit 3bbfcf7b39
25 changed files with 67 additions and 44 deletions

View file

@ -488,12 +488,13 @@ static int action_start_video_resolution(
{
#if defined(GEKKO) || defined(PS2) || !defined(__PSL1GHT__) && !defined(__PS3__)
unsigned width = 0, height = 0;
char desc[64] = {0};
global_t *global = global_get_ptr();
/* Reset the resolution id to zero */
global->console.screen.resolutions.current.id = 0;
if (video_driver_get_video_output_size(&width, &height))
if (video_driver_get_video_output_size(&width, &height, desc, sizeof(desc)))
{
char msg[PATH_MAX_LENGTH];
@ -510,6 +511,10 @@ static int action_start_video_resolution(
#endif
snprintf(msg, sizeof(msg),
"Resetting to: %dx%d", width, height);
/* Add description of resolution */
if (!string_is_empty(desc))
snprintf(msg, sizeof(msg), "%s - %s", msg, desc);
runloop_msg_queue_push(msg, 1, 100, true, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
}
#endif