From 1e228e1d9b7432015a0ed20d245ee8b91f7d0c22 Mon Sep 17 00:00:00 2001 From: Lior Halphon Date: Sat, 27 May 2017 19:16:07 +0300 Subject: [PATCH] =?UTF-8?q?Fixed=20a=20bug=20where=20the=20SDL=20port=20ex?= =?UTF-8?q?ited=20on=20=E2=80=9Cwarning=E2=80=9D=20=20logs=20when=20loadin?= =?UTF-8?q?g=20ROMs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SDL/main.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/SDL/main.c b/SDL/main.c index 8105927..e1fd764 100755 --- a/SDL/main.c +++ b/SDL/main.c @@ -385,18 +385,19 @@ restart: GB_set_sample_rate(&gb, have_aspec.freq); } + bool error = false; start_capturing_logs(); if (dmg) { - GB_load_boot_rom(&gb, executable_relative_path("dmg_boot.bin")); + error = GB_load_boot_rom(&gb, executable_relative_path("dmg_boot.bin")); } else { - GB_load_boot_rom(&gb, executable_relative_path("cgb_boot.bin")); + error = GB_load_boot_rom(&gb, executable_relative_path("cgb_boot.bin")); } - end_capturing_logs(true, true); + end_capturing_logs(true, error); start_capturing_logs(); - GB_load_rom(&gb, filename); - end_capturing_logs(true, true); + error = GB_load_rom(&gb, filename); + end_capturing_logs(true, error); size_t path_length = strlen(filename);