Changeset 0edef06 in buchla-emu for emu/main.c


Ignore:
Timestamp:
08/06/2017 08:20:22 AM (7 years ago)
Author:
Thomas Lopatic <thomas@…>
Branches:
master
Children:
3523847
Parents:
59ea67d
Message:

Configurable font file.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • emu/main.c

    r59ea67d r0edef06  
    4141const char *bios = "bios.abs";
    4242const char *disk = "buchla.disk";
     43const char *font = "ttf/vera-sans-mono.ttf";
    4344
    4445SDL_atomic_t run;
     
    4647static void usage(FILE *fh)
    4748{
    48         fprintf(fh, "usage: buchla [-h] [-v comp [-v comp [...]]] [-b bios] [-d disk]\n");
     49        fprintf(fh, "usage: buchla [-h] [-v comp [-v comp [...]]] [-b bios] [-d disk] [-f font]\n");
    4950        fprintf(fh, "where comp is one of: ");
    5051
     
    8384
    8485                        disk = argv[i];
     86                        continue;
     87                }
     88
     89                if (strcmp(argv[i], "-f") == 0) {
     90                        if (++i == argc) {
     91                                usage(stderr);
     92                                fprintf(stderr, "missing argument to -f\n");
     93                                exit(1);
     94                        }
     95
     96                        font = argv[i];
    8597                        continue;
    8698                }
Note: See TracChangeset for help on using the changeset viewer.