diff --git a/pcsx2/Makefile.am b/pcsx2/Makefile.am index 4f6b70356e..50069e2d73 100644 --- a/pcsx2/Makefile.am +++ b/pcsx2/Makefile.am @@ -22,4 +22,5 @@ Memory.h MemoryCard.h Misc.h Patch.h Paths.h Plugins.h PrecompiledHeader.h IopCo SPR.h SamplProf.h SaveState.h Sif.h Sifcmd.h Sio.h SafeArray.h Stats.h StringUtils.h System.h Threading.h \ VU.h VUflags.h VUmicro.h VUops.h Vif.h VifDma.h cheatscpp.h vtlb.h NakedAsm.h R5900Exceptions.h HostGui.h Pcsx2Config.h -SUBDIRS = x86 . DebugTools IPU RDebug tinyxml Linux \ No newline at end of file +SUBDIRS = x86 . DebugTools IPU RDebug tinyxml NewGUI +#Linux \ No newline at end of file diff --git a/pcsx2/NewGUI/Makefile.am b/pcsx2/NewGUI/Makefile.am new file mode 100644 index 0000000000..77897d0166 --- /dev/null +++ b/pcsx2/NewGUI/Makefile.am @@ -0,0 +1,19 @@ +AUTOMAKE_OPTIONS = foreign +INCLUDES = $(shell pkg-config --cflags gtk+-2.0) -I@srcdir@/../ -I@srcdir@/../../common/include -I@srcdir@/../../3rdparty $(shell wx-config --cppflags) + +bin_PROGRAMS = pcsx2 + +# the application source, library search path, and link libraries +pcsx2_SOURCES = \ +frmGameFixes.cpp frmGameFixes.h frmMain.cpp frmMain.h main.cpp \ +memzero.h + +pcsx2_LDFLAGS = + +pcsx2_DEPENDENCIES = ../libpcsx2.a ../IPU/libIPU.a ../IPU/mpeg2lib/libmpeg2IPU.a ../RDebug/libRDebug.a ../tinyxml/libtinyxml.a +pcsx2_DEPENDENCIES += ../x86/libx86recomp.a ../x86/ix86/libix86.a +pcsx2_DEPENDENCIES += ../DebugTools/libDebugTools.a + +pcsx2_LDADD = ../libpcsx2.a ../IPU/libIPU.a ../IPU/mpeg2lib/libmpeg2IPU.a ../RDebug/libRDebug.a ../tinyxml/libtinyxml.a +pcsx2_LDADD += ../x86/libx86recomp.a ../x86/ix86/libix86.a +pcsx2_LDADD += ../DebugTools/libDebugTools.a \ No newline at end of file diff --git a/pcsx2/NewGUI/frmGameFixes.cpp b/pcsx2/NewGUI/frmGameFixes.cpp index 51dd56225a..ad8399957d 100644 --- a/pcsx2/NewGUI/frmGameFixes.cpp +++ b/pcsx2/NewGUI/frmGameFixes.cpp @@ -4,20 +4,20 @@ #include "frmGameFixes.h" frmGameFixes::frmGameFixes(wxWindow* parent, int id, const wxPoint& pos, const wxSize& size, long style): - wxDialog( parent, id, _t("Game Special Fixes"), pos, size ) +wxDialog( parent, id, _T("Game Special Fixes"), pos, size ) { - wxStaticBox* groupbox = new wxStaticBox( this, -1, _t("PCSX2 Gamefixes")); + wxStaticBox* groupbox = new wxStaticBox( this, -1, _T("PCSX2 Gamefixes")); wxStaticText* label_Title = new wxStaticText( - this, wxID_ANY, "Some games need special settings.\nConfigure them here.", wxDefaultPosition, wxDefaultSize, wxALIGN_CENTRE + this, wxID_ANY, _T("Some games need special settings.\nConfigure them here."), wxDefaultPosition, wxDefaultSize, wxALIGN_CENTRE ); wxCheckBox* chk_FPUCompareHack = new wxCheckBox( - this, wxID_ANY, "FPU Compare Hack - Special fix for Digimon Rumble Arena 2." + this, wxID_ANY, _T("FPU Compare Hack - Special fix for Digimon Rumble Arena 2.") ); wxCheckBox* chk_TriAce = new wxCheckBox( - this, wxID_ANY, "VU Add / Sub Hack - Special fix for Tri-Ace games!" + this, wxID_ANY, _T("VU Add / Sub Hack - Special fix for Tri-Ace games!") ); wxCheckBox* chk_GodWar = new wxCheckBox( - this, wxID_ANY, "VU Clip Hack - Special fix for God of War" + this, wxID_ANY, _T("VU Clip Hack - Special fix for God of War") ); wxBoxSizer& mainSizer = *new wxBoxSizer( wxVERTICAL ); diff --git a/pcsx2/NewGUI/frmMain.cpp b/pcsx2/NewGUI/frmMain.cpp index 6ac5d72a91..47517d3e47 100644 --- a/pcsx2/NewGUI/frmMain.cpp +++ b/pcsx2/NewGUI/frmMain.cpp @@ -3,7 +3,7 @@ #include "PrecompiledHeader.h" #include "Misc.h" #include "frmMain.h" -#include "frmGamefixes.h" +#include "frmGameFixes.h" wxMenu* frmMain::MakeLanguagesMenu() const { @@ -11,7 +11,7 @@ wxMenu* frmMain::MakeLanguagesMenu() const // TODO : Index languages out of the resources and Langs folder. - menuLangs->Append(Menu_Language_Start, _t("English"), wxEmptyString, wxITEM_RADIO); + menuLangs->Append(Menu_Language_Start, _T("English"), wxEmptyString, wxITEM_RADIO); return menuLangs; } @@ -20,57 +20,57 @@ wxMenu* frmMain::MakeStatesMenu() { wxMenu* mnuStates = new wxMenu(); - m_LoadStatesSubmenu.Append( Menu_State_LoadOther, "Other...", wxEmptyString, wxITEM_NORMAL ); - m_SaveStatesSubmenu.Append( Menu_State_SaveOther, "Other...", wxEmptyString, wxITEM_NORMAL ); + m_LoadStatesSubmenu.Append( Menu_State_LoadOther, _T("Other..."), wxEmptyString, wxITEM_NORMAL ); + m_SaveStatesSubmenu.Append( Menu_State_SaveOther, _T("Other..."), wxEmptyString, wxITEM_NORMAL ); - mnuStates->Append( Menu_State_Load, _t("Load"), &m_LoadStatesSubmenu, wxEmptyString ); - mnuStates->Append( Menu_State_Save, _t("Save"), &m_SaveStatesSubmenu, wxEmptyString ); + mnuStates->Append( Menu_State_Load, _T("Load"), &m_LoadStatesSubmenu, wxEmptyString ); + mnuStates->Append( Menu_State_Save, _T("Save"), &m_SaveStatesSubmenu, wxEmptyString ); return mnuStates; } wxMenu* frmMain::MakeStatesSubMenu( int baseid ) const { wxMenu* mnuSubstates = new wxMenu(); - wxString slot( _t("Slot") ); + wxString slot( _T("Slot") ); - mnuSubstates->Append( baseid, _t("Slot"), wxEmptyString, wxITEM_NORMAL ); - mnuSubstates->Append( baseid+1, _t("Slot"), wxEmptyString, wxITEM_NORMAL ); - mnuSubstates->Append( baseid+2, _t("Slot"), wxEmptyString, wxITEM_NORMAL ); - mnuSubstates->Append( baseid+3, _t("Slot"), wxEmptyString, wxITEM_NORMAL ); - mnuSubstates->Append( baseid+4, _t("Slot"), wxEmptyString, wxITEM_NORMAL ); + mnuSubstates->Append( baseid, _T("Slot"), wxEmptyString, wxITEM_NORMAL ); + mnuSubstates->Append( baseid+1, _T("Slot"), wxEmptyString, wxITEM_NORMAL ); + mnuSubstates->Append( baseid+2, _T("Slot"), wxEmptyString, wxITEM_NORMAL ); + mnuSubstates->Append( baseid+3, _T("Slot"), wxEmptyString, wxITEM_NORMAL ); + mnuSubstates->Append( baseid+4, _T("Slot"), wxEmptyString, wxITEM_NORMAL ); return mnuSubstates; } void frmMain::PopulateVideoMenu() { - m_menuVideo.Append( Menu_Video_Basics, "Basic Settings...", wxEmptyString, wxITEM_CHECK ); + m_menuVideo.Append( Menu_Video_Basics, _T("Basic Settings..."), wxEmptyString, wxITEM_CHECK ); m_menuVideo.AppendSeparator(); // Populate options from the plugin here. - m_menuVideo.Append( Menu_Video_Advanced, "Advanced...", wxEmptyString, wxITEM_NORMAL ); + m_menuVideo.Append( Menu_Video_Advanced, _T("Advanced..."), wxEmptyString, wxITEM_NORMAL ); } void frmMain::PopulateAudioMenu() { // Populate options from the plugin here. - m_menuAudio.Append( Menu_Audio_Advanced, "Advanced...", wxEmptyString, wxITEM_NORMAL ); + m_menuAudio.Append( Menu_Audio_Advanced, _T("Advanced..."), wxEmptyString, wxITEM_NORMAL ); } void frmMain::PopulatePadMenu() { // Populate options from the plugin here. - m_menuPad.Append( Menu_Pad_Advanced, "Advanced...", wxEmptyString, wxITEM_NORMAL ); + m_menuPad.Append( Menu_Pad_Advanced, _T("Advanced..."), wxEmptyString, wxITEM_NORMAL ); } frmMain::frmMain(wxWindow* parent, int id, const wxString& title, const wxPoint& pos, const wxSize& size, long style): - wxFrame(parent, id, title, pos, size, wxCAPTION|wxCLOSE_BOX|wxSYSTEM_MENU|wxSIMPLE_BORDER), + wxFrame(parent, id, title, pos, size, wxCAPTION|wxCLOSE_BOX|wxSYSTEM_MENU|wxBORDER_THEME), m_menubar( *new wxMenuBar() ), m_statusbar( *CreateStatusBar(2, 0) ), - m_background( *new wxStaticBitmap(this, wxID_ANY, wxBitmap(wxT("./pcsxAbout.png"), wxBITMAP_TYPE_PNG) ) ), + m_background( *new wxStaticBitmap(this, wxID_ANY, wxBitmap(_T("./pcsxAbout.png"), wxBITMAP_TYPE_PNG) ) ), m_menuRun( *new wxMenu() ), m_menuConfig( *new wxMenu() ), @@ -86,46 +86,46 @@ frmMain::frmMain(wxWindow* parent, int id, const wxString& title, const wxPoint& // ------------------------------------------------------------------------ - m_menuRun.Append(Menu_QuickBootCD, "Boot CDVD (Quick)", wxEmptyString, wxITEM_NORMAL); - m_menuRun.Append(Menu_FullBootCD, "Boot CDVD (Full)", wxEmptyString, wxITEM_NORMAL); - m_menuRun.Append(Menu_BootNoCD, "Boot without CDVD", wxEmptyString, wxITEM_NORMAL); - m_menuRun.Append(Menu_RunELF, "Run ELF File...", wxEmptyString, wxITEM_NORMAL); + m_menuRun.Append(Menu_QuickBootCD, _T("Boot CDVD (Quick)"), wxEmptyString, wxITEM_NORMAL); + m_menuRun.Append(Menu_FullBootCD, _T("Boot CDVD (Full)"), wxEmptyString, wxITEM_NORMAL); + m_menuRun.Append(Menu_BootNoCD, _T("Boot without CDVD"), wxEmptyString, wxITEM_NORMAL); + m_menuRun.Append(Menu_RunELF, _T("Run ELF File..."), wxEmptyString, wxITEM_NORMAL); m_menuRun.AppendSeparator(); - m_menuRun.Append(Menu_SuspendExec, _t("Suspend"), "Suspends emulation progress.", wxITEM_NORMAL); - m_menuRun.Append(Menu_ResumeExec, _t("Resume"), "Resumes emulation progress.", wxITEM_NORMAL); - m_menuRun.Append(Menu_States, _t("States"), MakeStatesMenu(), wxEmptyString); - m_menuRun.Append(Menu_Reset, _t("Reset"), "Resets emulation state and reloads plugins.", wxITEM_NORMAL); + m_menuRun.Append(Menu_SuspendExec, _T("Suspend"), _T("Suspends emulation progress."), wxITEM_NORMAL); + m_menuRun.Append(Menu_ResumeExec, _T("Resume"), _T("Resumes emulation progress."), wxITEM_NORMAL); + m_menuRun.Append(Menu_States, _T("States"), MakeStatesMenu(), wxEmptyString); + m_menuRun.Append(Menu_Reset, _T("Reset"), _T("Resets emulation state and reloads plugins."), wxITEM_NORMAL); m_menuRun.AppendSeparator(); - m_menuRun.Append(Menu_Run_Exit, _t("Exit"), "Closing Pcsx2 may be hazardous to your health", wxITEM_NORMAL); + m_menuRun.Append(Menu_Run_Exit, _T("Exit"), _T("Closing Pcsx2 may be hazardous to your health"), wxITEM_NORMAL); // ------------------------------------------------------------------------ - m_menuConfig.Append(Menu_Config_CDVD, _t("Cdvdrom"), wxEmptyString, wxITEM_NORMAL); - m_menuConfig.Append(Menu_Config_DEV9, _t("Dev9"), wxEmptyString, wxITEM_NORMAL); - m_menuConfig.Append(Menu_Config_USB, _t("USB"), wxEmptyString, wxITEM_NORMAL); - m_menuConfig.Append(Menu_Config_FireWire, _t("Firewire"), wxEmptyString, wxITEM_NORMAL); + m_menuConfig.Append(Menu_Config_CDVD, _T("Cdvdrom"), wxEmptyString, wxITEM_NORMAL); + m_menuConfig.Append(Menu_Config_DEV9, _T("Dev9"), wxEmptyString, wxITEM_NORMAL); + m_menuConfig.Append(Menu_Config_USB, _T("USB"), wxEmptyString, wxITEM_NORMAL); + m_menuConfig.Append(Menu_Config_FireWire, _T("Firewire"), wxEmptyString, wxITEM_NORMAL); PopulateVideoMenu(); PopulateAudioMenu(); PopulatePadMenu(); m_menuConfig.AppendSeparator(); - m_menuConfig.Append(Menu_SelectPlugins, "Plugin Selector...", wxEmptyString, wxITEM_NORMAL); + m_menuConfig.Append(Menu_SelectPlugins, _T("Plugin Selector..."), wxEmptyString, wxITEM_NORMAL); m_menuConfig.AppendSeparator(); - m_menuConfig.Append(Menu_Config_Memcards, _t("Memcards"), "Memory card file locations and options.", wxITEM_NORMAL); - m_menuConfig.Append(Menu_Config_Gamefixes, _t("Gamefixes"), "God of War and TriAce fixes are found here.", wxITEM_NORMAL); - m_menuConfig.Append(Menu_Config_SpeedHacks, _t("Speed Hacks"), "Options to make Pcsx2 emulate faster, but less accurately.", wxITEM_NORMAL); - m_menuConfig.Append(Menu_Config_Patches, _t("Patches"), wxEmptyString, wxITEM_NORMAL); - m_menuConfig.Append(Menu_Config_Advanced, _t("Advanced"), "Cpu, Fpu, and Recompiler options.", wxITEM_NORMAL); + m_menuConfig.Append(Menu_Config_Memcards, _T("Memcards"), _T("Memory card file locations and options."), wxITEM_NORMAL); + m_menuConfig.Append(Menu_Config_Gamefixes, _T("Gamefixes"), _T("God of War and TriAce fixes are found here."), wxITEM_NORMAL); + m_menuConfig.Append(Menu_Config_SpeedHacks, _T("Speed Hacks"), _T("Options to make Pcsx2 emulate faster, but less accurately."), wxITEM_NORMAL); + m_menuConfig.Append(Menu_Config_Patches, _T("Patches"), wxEmptyString, wxITEM_NORMAL); + m_menuConfig.Append(Menu_Config_Advanced, _T("Advanced"), _T("Cpu, Fpu, and Recompiler options."), wxITEM_NORMAL); // ------------------------------------------------------------------------ - m_menuMisc.Append(Menu_Console, _t("Enable Console"), wxEmptyString, wxITEM_CHECK); - m_menuMisc.Append(Menu_Patches, _t("Enable Patches"), wxEmptyString, wxITEM_CHECK); - m_menuMisc.Append(Menu_Profiler,_t("Enable Profiler"), wxEmptyString, wxITEM_CHECK); + m_menuMisc.Append(Menu_Console, _T("Enable Console"), wxEmptyString, wxITEM_CHECK); + m_menuMisc.Append(Menu_Patches, _T("Enable Patches"), wxEmptyString, wxITEM_CHECK); + m_menuMisc.Append(Menu_Profiler,_T("Enable Profiler"), wxEmptyString, wxITEM_CHECK); m_menuMisc.AppendSeparator(); // No dialogs implemented for these yet... @@ -133,20 +133,20 @@ frmMain::frmMain(wxWindow* parent, int id, const wxString& title, const wxPoint& //m_menuMisc.Append(42, "Patch Finder...", wxEmptyString, wxITEM_NORMAL); // Ref will want this re-added eventually. - //m_menuMisc.Append(47, _t("Print CDVD Info..."), wxEmptyString, wxITEM_CHECK); + //m_menuMisc.Append(47, _T("Print CDVD Info..."), wxEmptyString, wxITEM_CHECK); - m_menuMisc.Append(Menu_Languages, _t("Languages"), MakeLanguagesMenu(), wxEmptyString); + m_menuMisc.Append(Menu_Languages, _T("Languages"), MakeLanguagesMenu(), wxEmptyString); m_menuMisc.AppendSeparator(); - m_menuMisc.Append(Menu_About, _t("About..."), wxEmptyString, wxITEM_NORMAL); - m_menuMisc.Append(Menu_Website, _t("Pcsx2 Website..."), "Opens your web-browser!", wxITEM_NORMAL); + m_menuMisc.Append(Menu_About, _T("About..."), wxEmptyString, wxITEM_NORMAL); + m_menuMisc.Append(Menu_Website, _T("Pcsx2 Website..."), _T("Opens your web-browser!"), wxITEM_NORMAL); - m_menubar.Append( &m_menuRun, "Run" ); - m_menubar.Append( &m_menuConfig, "Config" ); - m_menubar.Append( &m_menuVideo, "Video" ); - m_menubar.Append( &m_menuAudio, "Audio" ); - m_menubar.Append( &m_menuPad, "Pad" ); - m_menubar.Append( &m_menuMisc, "Misc" ); + m_menubar.Append( &m_menuRun, _T("Run" )); + m_menubar.Append( &m_menuConfig, _T("Config" )); + m_menubar.Append( &m_menuVideo, _T("Video" )); + m_menubar.Append( &m_menuAudio, _T("Audio" )); + m_menubar.Append( &m_menuPad, _T("Pad" )); + m_menubar.Append( &m_menuMisc, _T("Misc" )); SetMenuBar( &m_menubar ); @@ -232,13 +232,13 @@ void frmMain::set_properties() wxSize backsize( m_background.GetSize() ); SetTitle(_("Pcsx2")); - wxIcon _icon( wxT("./Cdrom02.png"), wxBITMAP_TYPE_PNG ); + wxIcon _icon( _T("./Cdrom02.png"), wxBITMAP_TYPE_PNG ); SetIcon(_icon); SetClientSize( backsize ); int m_statusbar_widths[] = { (int)(backsize.GetWidth()*0.73), (int)(backsize.GetWidth()*0.25) }; m_statusbar.SetStatusWidths(2, m_statusbar_widths); - m_statusbar.SetStatusText( wxT("The Status is Good!"), 0); - m_statusbar.SetStatusText( wxT("Good Status"), 1); + m_statusbar.SetStatusText( _T("The Status is Good!"), 0); + m_statusbar.SetStatusText( _T("Good Status"), 1); wxBoxSizer& joe( *new wxBoxSizer( wxVERTICAL ) ); diff --git a/pcsx2/SourceLog.cpp b/pcsx2/SourceLog.cpp index 84579c9a0e..55a2b9db05 100644 --- a/pcsx2/SourceLog.cpp +++ b/pcsx2/SourceLog.cpp @@ -37,7 +37,6 @@ using namespace R5900; FILE *emuLog; #ifdef PCSX2_DEVBUILD - LogSources varLog; // these used by the depreciated _old_Log only @@ -68,6 +67,7 @@ void __Log( const char* fmt, ... ) // fixme: should throw an exception here once we have proper exception handling implemented. } +#ifdef PCSX2_DEVBUILD if (varLog.LogToConsole) // log to console enabled? { Console::Write(tmp); @@ -79,6 +79,7 @@ void __Log( const char* fmt, ... ) //fputs( "\r\n", emuLog ); fflush( emuLog ); } +#endif } static __forceinline void _vSourceLog( u16 protocol, u8 source, u32 cpuPc, u32 cpuCycle, const char *fmt, va_list list ) @@ -103,7 +104,6 @@ static __forceinline void _vSourceLog( u16 protocol, u8 source, u32 cpuPc, u32 c { sendTTYP(logProtocol, logSource, tmp); } -#endif #endif if (varLog.LogToConsole) // log to console enabled? @@ -116,6 +116,7 @@ static __forceinline void _vSourceLog( u16 protocol, u8 source, u32 cpuPc, u32 c //fputs( "\r\n", emuLog ); fflush( emuLog ); } +#endif } // Note: This function automatically appends a newline character always! diff --git a/pcsx2/build.sh b/pcsx2/build.sh index 9b88972756..0734960074 100644 --- a/pcsx2/build.sh +++ b/pcsx2/build.sh @@ -19,6 +19,7 @@ #Normal #export PCSX2OPTIONS="--enable-debug --enable-devbuild --enable-sse3 --enable-sse4 --prefix `pwd`" +#export PCSX2OPTIONS="--with-wx" echo --------------- echo Building Pcsx2 diff --git a/pcsx2/configure.ac b/pcsx2/configure.ac index 4f3d12e5e1..a7a972cece 100644 --- a/pcsx2/configure.ac +++ b/pcsx2/configure.ac @@ -116,6 +116,31 @@ AC_MSG_CHECKING(gtk+) AC_CHECK_PROG(GTK_CONFIG, pkg-config, pkg-config) LIBS+=$(pkg-config --libs gtk+-2.0 gthread-2.0) +# Check for wxWidgets +AC_ARG_WITH( + [wx], + AC_HELP_STRING( + [--with-wx=dir], + [use wxWidgets configuration program wx-config in dir] + ) +) +if test $with_wx; then + AC_CHECK_PROG([WX_CONFIG],[wx-config],[$with_wx/wx-config],[],[$with_wx]) +else + AC_CHECK_PROG([WX_CONFIG],[wx-config],[wx-config]) +fi +if test $WX_CONFIG; then + USE_WX=1 + MYGUIDIR="NewGUI" + LIBS+=$(wx-config --libs) + else + MYGUIDIR="Linux" +fi +AC_SUBST([USE_WX],[]) +AC_SUBST([WX_CONFIG],[]) +AC_SUBST([WX_CPPFLAGS],[]) +AC_SUBST([WX_LDFLAGS],[]) + dnl AC_CHECK_LIB(pthread,main,[LIBS="$LIBS -lpthread"]) AC_CHECK_LIB(stdc++,main,[LIBS="$LIBS -lstdc++"]) AC_CHECK_LIB(z,main,[LIBS="$LIBS -lz"]) @@ -137,7 +162,7 @@ fi AC_OUTPUT([ Makefile DebugTools/Makefile - Linux/Makefile + NewGUI/Makefile IPU/Makefile IPU/mpeg2lib/Makefile RDebug/Makefile @@ -157,5 +182,5 @@ echo " Force sse3? $sse3" echo " nls support? $nls" echo " local plugin inis? $localinis" echo " custom cflags? $customcflags" -echo " memcpy_fast? $memcpyfast" +#echo " memcpy_fast? $memcpyfast" #echo " microVU? $microVU"