diff --git a/record/record_driver.c b/record/record_driver.c index fe69dcf232..3b3752bb0a 100644 --- a/record/record_driver.c +++ b/record/record_driver.c @@ -526,14 +526,10 @@ void recording_driver_set_data_ptr(void *data) recording_data = data; } -unsigned *recording_driver_get_width(void) +void recording_driver_get_size(unsigned *width, unsigned *height) { - return &recording_width; -} - -unsigned *recording_driver_get_height(void) -{ - return &recording_height; + *width = recording_width; + *height = recording_height; } void recording_driver_update_streaming_url(void) diff --git a/record/record_driver.h b/record/record_driver.h index 8d034f8939..6c20b7224d 100644 --- a/record/record_driver.h +++ b/record/record_driver.h @@ -202,12 +202,10 @@ void recording_driver_clear_data_ptr(void); void recording_driver_set_data_ptr(void *data); -unsigned *recording_driver_get_width(void); - -unsigned *recording_driver_get_height(void); - void recording_driver_free_state(void); +void recording_driver_get_size(unsigned *width, unsigned *height); + bool recording_is_enabled(void); bool streaming_is_enabled(void); diff --git a/retroarch.c b/retroarch.c index a5e6db9141..fe391b0c69 100644 --- a/retroarch.c +++ b/retroarch.c @@ -1073,13 +1073,21 @@ static void retroarch_parse_input_and_config(int argc, char *argv[]) break; case RA_OPT_SIZE: - if (sscanf(optarg, "%ux%u", - recording_driver_get_width(), - recording_driver_get_height()) != 2) { - RARCH_ERR("Wrong format for --size.\n"); - retroarch_print_help(argv[0]); - retroarch_fail(1, "retroarch_parse_input()"); + unsigned recording_width = 0; + unsigned recording_height = 0; + + recording_driver_get_size(&recording_width, + &recording_height); + + if (sscanf(optarg, "%ux%u", + &recording_width, + &recording_height) != 2) + { + RARCH_ERR("Wrong format for --size.\n"); + retroarch_print_help(argv[0]); + retroarch_fail(1, "retroarch_parse_input()"); + } } break;