mirror of
https://github.com/holub/mame
synced 2025-04-22 08:22:15 +03:00
Merge pull request #209 from dnlopez/master
In SDL version command line, don't look for depth in -resolution
This commit is contained in:
commit
154cd29ec1
@ -756,6 +756,11 @@ static void get_resolution(const char *defdata, const char *data, osd_window_con
|
||||
data = defdata;
|
||||
}
|
||||
|
||||
if (sscanf(data, "%dx%dx%d@%d", &config->width, &config->height, &config->depth, &config->refresh) < 2 && report_error)
|
||||
if (sscanf(data, "%dx%dx%d", &config->width, &config->height, &config->depth) < 2 && report_error)
|
||||
osd_printf_error("Illegal resolution value = %s\n", data);
|
||||
|
||||
const char * at_pos = strchr(data, '@');
|
||||
if (at_pos)
|
||||
if (sscanf(at_pos + 1, "%d", &config->refresh) < 1 && report_error)
|
||||
osd_printf_error("Illegal refresh rate in resolution value = %s\n", data);
|
||||
}
|
||||
|
@ -508,6 +508,12 @@ static void get_resolution(const char *defdata, const char *data, osd_window_con
|
||||
return;
|
||||
data = defdata;
|
||||
}
|
||||
if (sscanf(data, "%dx%d@%d", &config->width, &config->height, &config->refresh) < 2 && report_error)
|
||||
|
||||
if (sscanf(data, "%dx%dx%d", &config->width, &config->height, &config->depth) < 2 && report_error)
|
||||
osd_printf_error("Illegal resolution value = %s\n", data);
|
||||
|
||||
const char * at_pos = strchr(data, '@');
|
||||
if (at_pos)
|
||||
if (sscanf(at_pos + 1, "%d", &config->refresh) < 1 && report_error)
|
||||
osd_printf_error("Illegal refresh rate in resolution value = %s\n", data);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user