From 9deff96c78782a44b781ffcb032fa49175a1263b Mon Sep 17 00:00:00 2001 From: arcum42 Date: Sun, 1 Mar 2009 11:38:05 +0000 Subject: [PATCH] A few minor changes. git-svn-id: http://pcsx2.googlecode.com/svn/trunk@646 96395faa-99c1-11dd-bbfe-3dabce05a288 --- build.sh | 3 --- pcsx2/Linux/ConfigDlg.cpp | 25 +++++++------------------ pcsx2/Linux/ConfigDlg.h | 1 - pcsx2/Linux/LnxMain.cpp | 6 +----- pcsx2/Linux/LnxSysExec.cpp | 16 ++++++++++------ pcsx2/Misc.h | 6 ++++++ pcsx2/configure.ac | 18 +++++++++--------- pcsx2/x86/ix86/ix86_tools.cpp | 6 +++++- 8 files changed, 38 insertions(+), 43 deletions(-) diff --git a/build.sh b/build.sh index ce29ad96bf..ca1c11b69d 100644 --- a/build.sh +++ b/build.sh @@ -17,9 +17,6 @@ export PCSX2OPTIONS="--enable-sse3 --enable-sse4 --enable-devbuild --prefix `pwd #Optimized, but a devbuild - with memcpy_fast_ enabled. - BROKEN! #export PCSX2OPTIONS="--enable-sse3 --enable-sse4 --enable-devbuild --enable-memcpyfast --prefix `pwd`" -#Optimized, but a devbuild - with microVU enabled. - NOT FULLY IMPLEMENTED!! -#export PCSX2OPTIONS="--enable-sse3 --enable-sse4 --enable-devbuild --enable-microVU --prefix `pwd`" - #ZeroGS Normal mode export ZEROGSOPTIONS="--enable-sse2" diff --git a/pcsx2/Linux/ConfigDlg.cpp b/pcsx2/Linux/ConfigDlg.cpp index 4a9c3d2b33..789fe5095e 100644 --- a/pcsx2/Linux/ConfigDlg.cpp +++ b/pcsx2/Linux/ConfigDlg.cpp @@ -51,17 +51,13 @@ static void ConfPlugin(PluginConf confs, char* plugin, const char* name) { void *drv; void (*conf)(); - char file[g_MaxPath], file2[g_MaxPath]; GetComboText(confs.Combo, confs.plist, plugin); - strcpy(file, Config.PluginsDir); - strcat(file, plugin); - - drv = SysLoadLibrary(file); + drv = SysLoadLibrary( Path::Combine( Config.PluginsDir, plugin ).c_str() ); + if (drv == NULL) return; //#ifndef LOCAL_PLUGIN_INIS // chdir(Config.PluginsDir); /* change dirs so that plugins can find their config file*/ //#endif - if (drv == NULL) return; conf = (void (*)()) SysLoadSym(drv, name); if (SysLibError() == NULL) conf(); @@ -76,16 +72,13 @@ static void TestPlugin(PluginConf confs, char* plugin, const char* name) { void *drv; s32(* (*conf)())(); - char file[g_MaxPath]; int ret = 0; GetComboText(confs.Combo, confs.plist, plugin); - strcpy(file, Config.PluginsDir); - strcat(file, plugin); - - drv = SysLoadLibrary(file); + if (plugin == NULL) return; + drv = SysLoadLibrary( Path::Combine( Config.PluginsDir, plugin ).c_str() ); if (drv == NULL) return; - + conf = (s32(* (*)())()) SysLoadSym(drv, name); if (SysLibError() == NULL) ret = (s32) conf(); SysCloseLibrary(drv); @@ -206,12 +199,8 @@ void OnConfConf_Ok(GtkButton *button, gpointer user_data) applychanges = FALSE; SaveConfig(); - - if (configuringplug == FALSE) - { - ReleasePlugins(); - LoadPlugins(); - } + SysRestorableReset(); + ReleasePlugins(); gtk_widget_destroy(ConfDlg); if (MainWindow) gtk_widget_set_sensitive(MainWindow, TRUE); diff --git a/pcsx2/Linux/ConfigDlg.h b/pcsx2/Linux/ConfigDlg.h index 2dee968cc5..6068a36af6 100644 --- a/pcsx2/Linux/ConfigDlg.h +++ b/pcsx2/Linux/ConfigDlg.h @@ -72,6 +72,5 @@ static void ConfPlugin(PluginConf confs, char* plugin, const char* name); static void TestPlugin(PluginConf confs, char* plugin, const char* name); extern void CheckSlots(); -extern bool configuringplug; #endif // __CONFIGDLG_H__ \ No newline at end of file diff --git a/pcsx2/Linux/LnxMain.cpp b/pcsx2/Linux/LnxMain.cpp index a027d4ccd8..7ec365cc3c 100644 --- a/pcsx2/Linux/LnxMain.cpp +++ b/pcsx2/Linux/LnxMain.cpp @@ -23,7 +23,6 @@ using namespace R5900; DIR *dir; GtkWidget *FileSel; GtkWidget *MsgDlg; -bool configuringplug = FALSE; const char* g_pRunGSState = NULL; int efile = 0; @@ -295,10 +294,8 @@ int Pcsx2Configure() { if (!UseGui) return 0; - configuringplug = TRUE; MainWindow = NULL; OnConf_Conf(NULL, 0); - configuringplug = FALSE; return applychanges; } @@ -314,8 +311,7 @@ void OnLanguage(GtkMenuItem *menuitem, gpointer user_data) void OnFile_RunCD(GtkMenuItem *menuitem, gpointer user_data) { - safe_free(g_RecoveryState); - ResetPlugins(); + SysReset(); RunExecute(NULL); } diff --git a/pcsx2/Linux/LnxSysExec.cpp b/pcsx2/Linux/LnxSysExec.cpp index 30206b8174..0021a7e9d4 100644 --- a/pcsx2/Linux/LnxSysExec.cpp +++ b/pcsx2/Linux/LnxSysExec.cpp @@ -340,7 +340,6 @@ void RunExecute(const char* elf_file, bool use_bios) ClosePlugins( true ); return; } - safe_delete(g_RecoveryState); } else if( g_gsRecoveryState == NULL ) { @@ -476,8 +475,7 @@ void States_Load(const string& file, int num = -1) else sprintf (Text, _("*PCSX2*: Loaded State %s"), file.c_str()); - //StatusBar_Notice( Text ); - Console::Notice(Text); + StatusBar_Notice( Text ); if( GSsetGameCRC != NULL ) GSsetGameCRC(ElfCRC, g_ZeroGSOptions); } @@ -536,7 +534,7 @@ void States_Save( const string& file, int num = -1 ) else ssprintf( text, _( "State saved to file: %s" ), file.c_str() ); - Console::Notice(text.c_str()); + StatusBar_Notice( text ); } catch( Exception::BaseException& ex ) { @@ -856,6 +854,9 @@ void SysReset() { if (!sinit) return; + StatusBar_Notice(_("Resetting...")); + //Console::SetTitle(_("Resetting...")); + g_EmulationInProgress = false; safe_delete( g_RecoveryState ); safe_delete( g_gsRecoveryState ); @@ -865,6 +866,9 @@ void SysReset() // Note : No need to call cpuReset() here. It gets called automatically before the // emulator resumes execution. + + StatusBar_Notice(_("Ready")); + //Console::SetTitle(_("*PCSX2* Emulation state is reset.")); } bool SysInit() @@ -908,7 +912,7 @@ bool SysInit() void SysClose() { - if (sinit == 0) return; + if (sinit == false) return; cpuShutdown(); ClosePlugins( true ); ReleasePlugins(); @@ -918,7 +922,7 @@ void SysClose() fclose(emuLog); emuLog = NULL; } - sinit = 0; + sinit = false; } void *SysLoadLibrary(const char *lib) diff --git a/pcsx2/Misc.h b/pcsx2/Misc.h index b8b23e139a..90a54d90f6 100644 --- a/pcsx2/Misc.h +++ b/pcsx2/Misc.h @@ -211,8 +211,14 @@ void SetCPUState(u32 sseMXCSR, u32 sseVUMXCSR); // when using mmx/xmm regs, use; 0 is load // freezes no matter the state +#ifndef __INTEL_COMPILER extern "C" void FreezeXMMRegs_(int save); extern "C" void FreezeMMXRegs_(int save); +#else +extern void FreezeXMMRegs_(int save); +extern void FreezeMMXRegs_(int save); +#endif + extern bool g_EEFreezeRegs; extern u8 g_globalMMXSaved; extern u8 g_globalXMMSaved; diff --git a/pcsx2/configure.ac b/pcsx2/configure.ac index a3432f9842..49fe76a9c3 100644 --- a/pcsx2/configure.ac +++ b/pcsx2/configure.ac @@ -72,14 +72,14 @@ then fi AC_MSG_RESULT($memcpyfast) -AC_MSG_CHECKING(turn on microVU) -AC_ARG_ENABLE(microVU, AC_HELP_STRING([--enable-microVU], [Turns on the currently incomplete microVU files - Not a good idea]), - microVU=$enableval,microVU=no) -if test "x$microVU" == xyes -then - AC_DEFINE(PCSX2_MICROVU,1,[PCSX2_MICROVU]) -fi -AC_MSG_RESULT($microVU) +#AC_MSG_CHECKING(turn on microVU) +#AC_ARG_ENABLE(microVU, AC_HELP_STRING([--enable-microVU], [Turns on the currently incomplete microVU files - Not a good idea]), +# microVU=$enableval,microVU=no) +#if test "x$microVU" == xyes +#then +# AC_DEFINE(PCSX2_MICROVU,1,[PCSX2_MICROVU]) +#fi +#AC_MSG_RESULT($microVU) dnl Check for dev build AC_MSG_CHECKING(for development build) @@ -157,4 +157,4 @@ echo " nls support? $nls" echo " local plugin inis? $localinis" echo " custom cflags? $customcflags" echo " memcpy_fast? $memcpyfast" -echo " microVU? $microVU" +#echo " microVU? $microVU" diff --git a/pcsx2/x86/ix86/ix86_tools.cpp b/pcsx2/x86/ix86/ix86_tools.cpp index 61216b2ec0..7715118d2d 100644 --- a/pcsx2/x86/ix86/ix86_tools.cpp +++ b/pcsx2/x86/ix86/ix86_tools.cpp @@ -68,8 +68,10 @@ void SetCPUState(u32 sseMXCSR, u32 sseVUMXCSR) ///////////////////////////////////////////////////////////////////// // +#ifndef __INTEL_COMPILER extern "C" { +#endif __forceinline void FreezeMMXRegs_(int save) { assert( g_EEFreezeRegs ); @@ -226,4 +228,6 @@ __forceinline void FreezeXMMRegs_(int save) #endif // _MSC_VER } } -} \ No newline at end of file +#ifndef __INTEL_COMPILER +} +#endif \ No newline at end of file