commit | cc27cfe673868e6322908f2c448344988d35b222 | [log] [tgz] |
---|---|---|
author | swissChili <swisschili@fastmail.com> | Sat Aug 08 12:57:57 2020 -0700 |
committer | swissChili <swisschili@fastmail.com> | Sat Aug 08 12:57:57 2020 -0700 |
tree | e686f03c800c6e034fcdc06a4aef4ca81cbea1cd | |
parent | f32d36a2c2baf41539b7a92eeca86a7097abb240 [diff] [blame] |
Multithread SDL renderer
diff --git a/main.c b/main.c index 84e9779..e91e699 100644 --- a/main.c +++ b/main.c
@@ -92,8 +92,12 @@ if (scrflag) { +#ifndef NO_PTHREAD + start_screen_thread(cpu.mem + CPU_FB_ADDR); +#else sdl_screen_t scr = new_sdl_screen(8); g_scr = &scr; +#endif } if (guiflag) @@ -113,6 +117,9 @@ debug(&cpu); } + if (scrflag) + free_sdl_screen(g_scr); + if (should_read) free_cpu(&cpu); }