diff --git a/desmume/src/cli/Makefile.am b/desmume/src/cli/Makefile.am index 298bba56c..143783535 100644 --- a/desmume/src/cli/Makefile.am +++ b/desmume/src/cli/Makefile.am @@ -1,11 +1,11 @@ SUBDIRS = doc include $(top_srcdir)/src/desmume.mk -AM_CPPFLAGS += $(SDL_CFLAGS) $(ALSA_CFLAGS) $(LIBAGG_CFLAGS) $(GLIB_CFLAGS) +AM_CPPFLAGS += $(SDL_CFLAGS) $(ALSA_CFLAGS) $(LIBAGG_CFLAGS) $(GLIB_CFLAGS) $(GTHREAD_CFLAGS) bin_PROGRAMS = desmume-cli desmume_cli_SOURCES = main.cpp ../sndsdl.cpp ../ctrlssdl.h ../ctrlssdl.cpp -desmume_cli_LDADD = ../libdesmume.a $(SDL_LIBS) $(ALSA_LIBS) $(LIBAGG_LIBS) $(GLIB_LIBS) +desmume_cli_LDADD = ../libdesmume.a $(SDL_LIBS) $(ALSA_LIBS) $(LIBAGG_LIBS) $(GLIB_LIBS) $(GTHREAD_LIBS) if HAVE_GDB_STUB desmume_cli_LDADD += ../gdbstub/libgdbstub.a endif diff --git a/desmume/src/cli/main.cpp b/desmume/src/cli/main.cpp index bcf1597f9..cc52c8f09 100644 --- a/desmume/src/cli/main.cpp +++ b/desmume/src/cli/main.cpp @@ -22,7 +22,7 @@ #include #include #include - +#include #ifndef VERSION #define VERSION "Unknown version" @@ -778,6 +778,10 @@ int main(int argc, char ** argv) { fw_config.language = my_config.firmware_language; } + if ( !g_thread_supported()) { + g_thread_init( NULL); + } + #ifdef GDB_STUB if ( my_config.arm9_gdb_port != 0) { arm9_gdb_stub = createStub_gdb( my_config.arm9_gdb_port,