diff --git a/crater.c b/crater.c index b4138df..5f80ec2 100644 --- a/crater.c +++ b/crater.c @@ -42,7 +42,7 @@ int main(int argc, char *argv[]) retval = EXIT_FAILURE; } else { printf("crater: emulating: %s\n", rom.name); - emulate(&rom, config->fullscreen, config->scale); + emulate(&rom, config); rom_close(&rom); } } diff --git a/src/emulator.c b/src/emulator.c index 1347f1f..66a9336 100644 --- a/src/emulator.c +++ b/src/emulator.c @@ -130,11 +130,11 @@ static void cleanup_graphics() Block until emulation is finished. */ -void emulate(ROM *rom, bool fullscreen, unsigned scale) +void emulate(ROM *rom, Config *config) { emu.gg = gamegear_create(); signal(SIGINT, handle_sigint); - setup_graphics(fullscreen, scale); + setup_graphics(config->fullscreen, config->scale); gamegear_attach_callback(emu.gg, frame_callback); gamegear_attach_display(emu.gg, emu.pixels); diff --git a/src/emulator.h b/src/emulator.h index d4b52b6..7d25244 100644 --- a/src/emulator.h +++ b/src/emulator.h @@ -5,8 +5,9 @@ #include +#include "config.h" #include "rom.h" /* Functions */ -void emulate(ROM*, bool, unsigned); +void emulate(ROM*, Config*);