Linux: A little more consistancy about using the System.h wrappers, restore the bin symlink, and a few other minor changes to plugins.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@561 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
arcum42 2009-02-21 11:14:09 +00:00
parent f6f1f8665b
commit 816647a86f
7 changed files with 26 additions and 31 deletions

View File

@ -515,30 +515,22 @@ void FindPlugins()
sprintf(plugin, "%s%s", Config.PluginsDir, ent->d_name);
if (strstr(plugin, ".so") == NULL) continue;
Handle = dlopen(plugin, RTLD_NOW);
Handle = SysLoadLibrary(plugin);
if (Handle == NULL)
{
Console::Error("Can't open %s: %s\n", params ent->d_name, dlerror());
Console::Error("Can't open %s: %s\n", params ent->d_name, SysLibError());
continue;
}
PS2EgetLibType = (_PS2EgetLibType) SysLoadSym(Handle, "PS2EgetLibType");
PS2EgetLibName = (_PS2EgetLibName) SysLoadSym(Handle, "PS2EgetLibName");
PS2EgetLibVersion2 = (_PS2EgetLibVersion2) SysLoadSym(Handle, "PS2EgetLibVersion2");
PS2EgetLibType = (_PS2EgetLibType) dlsym(Handle, "PS2EgetLibType");
PS2EgetLibName = (_PS2EgetLibName) dlsym(Handle, "PS2EgetLibName");
PS2EgetLibVersion2 = (_PS2EgetLibVersion2) dlsym(Handle, "PS2EgetLibVersion2");
if (PS2EgetLibType == NULL)
if ((PS2EgetLibType == NULL) || (PS2EgetLibName == NULL) || (PS2EgetLibVersion2 == NULL))
{
Console::Error("PS2EgetLibType==NULL for %s", params ent->d_name);
continue;
}
if (PS2EgetLibName == NULL)
{
Console::Error("PS2EgetLibName==NULL for %s", params ent->d_name);
continue;
}
if (PS2EgetLibVersion2 == NULL)
{
Console::Error("PS2EgetLibVersion2==NULL for %s", params ent->d_name);
if (PS2EgetLibType == NULL) Console::Error("PS2EgetLibType==NULL for %s", params ent->d_name);
if (PS2EgetLibName == NULL) Console::Error("PS2EgetLibName==NULL for %s", params ent->d_name);
if (PS2EgetLibVersion2 == NULL) Console::Error("PS2EgetLibVersion2==NULL for %s", params ent->d_name);
continue;
}

View File

@ -64,11 +64,11 @@ int main(int argc, char *argv[])
#endif
// make gtk thread safe if using MTGS
/*if (CHECK_MULTIGS)
{*/
if (CHECK_MULTIGS)
{
g_thread_init(NULL);
gdk_threads_init();
/*}*/
}
if (UseGui)
{
@ -366,7 +366,7 @@ void pcsx2_exit()
sprintf(plugin, "%s%s", Config.PluginsDir, ent->d_name);
if (strstr(plugin, ".so") == NULL) continue;
Handle = dlopen(plugin, RTLD_NOW);
Handle = SysLoadLibrary(plugin);
if (Handle == NULL) continue;
}
}
@ -388,7 +388,7 @@ void pcsx2_exit()
void SignalExit(int sig)
{
ClosePlugins( true );
ClosePlugins(true);
pcsx2_exit();
}

View File

@ -1 +0,0 @@
link ../bin

1
pcsx2/bin Symbolic link
View File

@ -0,0 +1 @@
../bin

View File

@ -88,7 +88,7 @@ s32 CALLBACK FWopen(void *pDsp) {
#ifdef _WIN32
#else
Display* dsp = *(Display**)pDsp;
//Display* dsp = *(Display**)pDsp;
#endif
return 0;

View File

@ -93,8 +93,6 @@ void CFGabout() {
GtkWidget *Conf;
void OnConf_Ok(GtkButton *button, gpointer user_data) {
gchar *str;
SaveConfig();
gtk_widget_destroy(Conf);

View File

@ -6,6 +6,11 @@ INCLUDES = -I@srcdir@/common -I@srcdir@/3rdparty -I@srcdir@/Linux
libSPU2X_a_CXXFLAGS = $(shell pkg-config --cflags gtk+-2.0)
libSPU2X_a_CFLAGS = $(shell pkg-config --cflags gtk+-2.0)
if X86_64
libSPU2X_a_CXXFLAGS += -fPIC
libSPU2X_a_CFLAGS += -fPIC
endif
# Create a shared object by faking an exe (thanks to ODE makefiles)
traplibdir=$(prefix)
@ -17,16 +22,16 @@ EXEEXT=$(preext)@so_ext@
traplib_PROGRAMS=libSPU2X
libSPU2X_SOURCES=
libSPU2X_DEPENDENCIES = libSPU2X.a
libSPU2X_DEPENDENCIES = libSPU2X.a 3rdparty/SoundTouch/libSoundTouch.a
libSPU2X_LDFLAGS= @SHARED_LDFLAGS@
libSPU2X_LDFLAGS+=-Wl,-soname,@SPU2X_SONAME@
libSPU2X_LDADD=$(llibSPU2X_a_OBJECTS) 3rdparty/SoundTouch/libSoundTouch.a
libSPU2X_a_SOURCES = ADSR.cpp DllInterface.cpp Mixer.cpp RegTable.cpp SaveStateSPU.cpp \
libSPU2X_a_SOURCES = ADSR.cpp DllInterface.cpp Mixer.cpp RegTable.cpp SaveStateSPU.cpp ConvertUTF.cpp \
Spu2.cpp Timestretcher.cpp utf8.cpp Debug.cpp Decoder.cpp \
Dma.cpp Lowpass.cpp RegLog.cpp Reverb.cpp SndOut.cpp Spu2replay.cpp Wavedump_wav.cpp ReadInput.cpp
libSPU2X_a_SOURCES += BaseTypes.h Debug.h Dma.h Lowpass.h RegTable.h SndOut.h \
libSPU2X_a_SOURCES += BaseTypes.h Debug.h Dma.h Lowpass.h RegTable.h SndOut.h ConvertUTF.h \
Spu2.h Spu2replay.h defs.h regs.h spdif.h utf8.h
libSPU2X_a_SOURCES += Linux/Config.h Linux/Config.cpp Linux/Linux.h Linux/Alsa.cpp Linux/Alsa.h Linux/Dialogs.cpp Linux/Dialogs.h

View File

@ -111,7 +111,7 @@ void SPU2writeLog( const char* action, u32 rmem, u16 value )
break;
case SPDIF_PROTECT:
if(Spdif.Protection != value) ConLog(" * SPU2: SPDIF Copy set to %04x\n",value);
RegLog(2,"SPDIF_COPY",rmem,-1,value);
RegLog(2,"SPDIF_PROTECT",rmem,-1,value);
break;
}
UpdateSpdifMode();