mirror of https://github.com/mgba-emu/mgba.git
Load files from arg 1
This commit is contained in:
parent
301c07dda3
commit
7c895f6091
11
src/main.c
11
src/main.c
|
@ -38,9 +38,14 @@ static const GLint _glTexCoords[] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
int main(int argc, char** argv) {
|
int main(int argc, char** argv) {
|
||||||
(void)(argc);
|
const char* fname = "test.rom";
|
||||||
(void)(argv);
|
if (argc > 1) {
|
||||||
int fd = open("test.rom", O_RDONLY);
|
fname = argv[1];
|
||||||
|
}
|
||||||
|
int fd = open(fname, O_RDONLY);
|
||||||
|
if (fd < 0) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
sigset_t signals;
|
sigset_t signals;
|
||||||
sigaddset(&signals, SIGINT);
|
sigaddset(&signals, SIGINT);
|
||||||
|
|
Loading…
Reference in New Issue