From 853347bc9f561fd3a88f0e316a41a590ee9170dd Mon Sep 17 00:00:00 2001 From: theoddone33 <> Date: Tue, 15 May 2001 16:39:26 +0000 Subject: [PATCH] Re-add bitdepth switch. Sshhhh, it's undocumented! --- zsnes/src/linux/zloaderw.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/zsnes/src/linux/zloaderw.c b/zsnes/src/linux/zloaderw.c index 780e14a6..fa7a8290 100644 --- a/zsnes/src/linux/zloaderw.c +++ b/zsnes/src/linux/zloaderw.c @@ -54,6 +54,7 @@ extern unsigned char Palette0, SPC700sh, OffBy1Line, DSPDisable, int getopt(int argc, char *const argv[], const char *optstring); extern char *optarg; extern int optind, opterr, optopt; +extern int BitDepth; void ccmdline(void); @@ -98,7 +99,7 @@ int main (int argc, char *argv[]) { char *fvar; UnProtectMemory(); - while((opt = getopt(argc, argv, "01:2:789ac:d:ef:g:hijk:lmno:p:r:s:tuv:wyz?")) != -1) { + while((opt = getopt(argc, argv, "01:2:789ab:c:d:ef:g:hijk:lmno:p:r:s:tuv:wyz?")) != -1) { switch(opt) { /* Palette 0 disable */ case '0': { @@ -143,6 +144,21 @@ int main (int argc, char *argv[]) { break; } + case 'b': { + // What was this? - DDOI + //SoundCompD = 1; + if(optarg != NULL) + BitDepth = atoi(optarg); + if (BitDepth != 8 && BitDepth != 16 && + BitDepth != 24 && BitDepth != 32) + { + printf ("%d is not a valid bit depth.\n", BitDepth); + exit(1); + } + + break; + } + case 'c': { if (strcmp(optarg,"b") == 0) { printf("\nRemove background color in 256 modes not implemented!\n");