From: notaz Date: Tue, 18 Nov 2014 21:44:57 +0000 (+0200) Subject: remove -s option X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=60707a511ee11a8af5d64fab1cc66ca9895d00bf;p=megadrive.git remove -s option not really that useful --- diff --git a/host/main.c b/host/main.c index 5257979..9cc492c 100644 --- a/host/main.c +++ b/host/main.c @@ -786,12 +786,6 @@ int main(int argc, char *argv[]) missing_arg(i); logfn = argv[i]; continue; - case 's': - i++; - if (argv[i] == NULL) - missing_arg(i); - tas_skip = atoi(argv[i]); - continue; case 'v': use_vsync = 1; continue; @@ -884,31 +878,6 @@ int main(int argc, char *argv[]) fprintf(stderr, "failed fo parse %s\n", tasfn); return 1; } - - if (tas_skip != 0) { - // FIXME: no longer a byte - if (tas_skip >= tas_data_size || tas_skip <= -tas_data_size) { - printf("skip out of range: %d/%d\n", tas_skip, tas_data_size); - return 1; - } - if (tas_skip > 0) { - tas_data_size -= tas_skip; - memmove(&tas_data[0], &tas_data[tas_skip], - sizeof(tas_data[0]) * tas_data_size); - } - else { - tas_data = realloc(tas_data, - (tas_data_size - tas_skip) * sizeof(tas_data[0])); - if (tas_data == NULL) { - fprintf(stderr, "OOM?\n"); - return 1; - } - memmove(&tas_data[-tas_skip], &tas_data[0], - sizeof(tas_data[0]) * tas_data_size); - memset(&tas_data[0], 0xff, sizeof(tas_data[0]) * -tas_skip); - tas_data_size -= tas_skip; - } - } } if (outfn != NULL) {