Init glib threads
We actually does not use them but there's a plan to do so.
This commit is contained in:
parent
823030cbaf
commit
6c996f8993
|
@ -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
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#include <SDL_thread.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <glib.h>
|
||||
|
||||
#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,
|
||||
|
|
Loading…
Reference in New Issue