Load files from arg 1

This commit is contained in:
Jeffrey Pfau 2013-04-26 01:50:14 -07:00
parent 301c07dda3
commit 7c895f6091
1 changed files with 8 additions and 3 deletions

View File

@ -38,9 +38,14 @@ static const GLint _glTexCoords[] = {
};
int main(int argc, char** argv) {
(void)(argc);
(void)(argv);
int fd = open("test.rom", O_RDONLY);
const char* fname = "test.rom";
if (argc > 1) {
fname = argv[1];
}
int fd = open(fname, O_RDONLY);
if (fd < 0) {
return 1;
}
sigset_t signals;
sigaddset(&signals, SIGINT);