From e85abdeb2c9d372beb73354f95f84200bba0a8fc Mon Sep 17 00:00:00 2001 From: Peter Tissen Date: Mon, 9 Jun 2014 02:51:55 +0200 Subject: [PATCH] remove unexplained commented out code that I added myself with the last PR * remove unexplained commented out code that I added myself * revert asmjit settings change that was meant to only be local for me --- Utilities/StrFmt.h | 23 -------------- Utilities/rConcurrency.cpp | 15 --------- Utilities/rFile.cpp | 16 ---------- Utilities/rPlatform.cpp | 5 --- Utilities/rPlatform.h | 28 +---------------- Utilities/rTime.cpp | 32 +------------------ asmjitsrc/asmjit.vcxproj | 10 ++---- rpcs3.sln | 2 -- rpcs3/Emu/Cell/PPUInterpreter.h | 1 - rpcs3/Emu/Cell/PPUThread.h | 1 - rpcs3/Emu/DbgConsole.h | 56 --------------------------------- rpcs3/Emu/GS/GL/GLGSRender.cpp | 3 +- rpcs3/Emu/Io/Pad.cpp | 8 ----- rpcs3/Emu/SysCalls/Modules.cpp | 3 -- rpcs3/Emu/System.h | 4 --- rpcs3/stdafx.h | 13 -------- 16 files changed, 5 insertions(+), 215 deletions(-) diff --git a/Utilities/StrFmt.h b/Utilities/StrFmt.h index 9b4892b959..2ac1d27cc7 100644 --- a/Utilities/StrFmt.h +++ b/Utilities/StrFmt.h @@ -9,29 +9,6 @@ #define snprintf _snprintf #endif - - -//int CmpNoCase(const std::string &str, const std::string &str2) -//{ -// bool same; -// if (str.size() > str2.size()) -// { -// same = std::equal(str.cbegin(), str.cend(), str2.cbegin(), [](const char a, const char b) -> bool{ return tolower(a) == tolower(b); }); -// } -// else -// { -// same = std::equal(str2.cbegin(), str2.cend(), str.cbegin(), [](const char a, const char b) -> bool{ return tolower(a) == tolower(b); }); -// } -// if (same) -// { -// return 0; -// } -// else -// { -// return 1; -// } -//} - namespace fmt{ using std::string; using std::ostream; diff --git a/Utilities/rConcurrency.cpp b/Utilities/rConcurrency.cpp index cf60ff69ca..10afc624e2 100644 --- a/Utilities/rConcurrency.cpp +++ b/Utilities/rConcurrency.cpp @@ -5,11 +5,6 @@ rSemaphore::rSemaphore() handle = reinterpret_cast(new wxSemaphore()); } -//rSemaphore::rSemaphore(rSemaphore& other) -//{ -// handle = reinterpret_cast(new wxSemaphore(*reinterpret_cast(other.handle))); -//} - rSemaphore::~rSemaphore() { delete reinterpret_cast(handle); @@ -53,11 +48,6 @@ rCriticalSection::rCriticalSection() handle = reinterpret_cast(new wxCriticalSection()); } -//rCriticalSection::rCriticalSection(rCriticalSection&) -//{ -// handle = reinterpret_cast(new wxCriticalSection(*reinterpret_cast(other.handle))); -//} - rCriticalSection::~rCriticalSection() { delete reinterpret_cast(handle); @@ -78,11 +68,6 @@ rTimer::rTimer() handle = reinterpret_cast(new wxTimer()); } -//rTimer::rTimer(rTimer&) -//{ -// handle = reinterpret_cast(new wxTimer(*reinterpret_cast(other.handle))); -//} - rTimer::~rTimer() { delete reinterpret_cast(handle); diff --git a/Utilities/rFile.cpp b/Utilities/rFile.cpp index c05e8e9c8e..51f47a990e 100644 --- a/Utilities/rFile.cpp +++ b/Utilities/rFile.cpp @@ -2,22 +2,6 @@ const int rPATH_MKDIR_FULL = wxPATH_MKDIR_FULL; -//enum rSeekMode -//{ -// rFromStart, -// rFromCurrent, -// rFromEnd -//}; -// -// enum OpenMode -// { -// read, -// write, -// read_write, -// write_append, -// write_excl -// }; - wxFile::OpenMode convertOpenMode(rFile::OpenMode open) { wxFile::OpenMode mode; diff --git a/Utilities/rPlatform.cpp b/Utilities/rPlatform.cpp index 2fa307fb58..60144f5001 100644 --- a/Utilities/rPlatform.cpp +++ b/Utilities/rPlatform.cpp @@ -26,11 +26,6 @@ rCanvas::~rCanvas() delete static_cast(handle); } -//void *rCanvas::GetCurrent() -//{ -// static_cast(handle)->GetCur; -//} - bool rCanvas::SetCurrent(void *ctx) { return static_cast(handle)->SetCurrent(*static_cast(ctx)); diff --git a/Utilities/rPlatform.h b/Utilities/rPlatform.h index 040d1f3e1c..8d8edfca98 100644 --- a/Utilities/rPlatform.h +++ b/Utilities/rPlatform.h @@ -2,7 +2,6 @@ #include #include -//struct rGLContext; #include "Emu/Io/Null/NullKeyboardHandler.h" #include "Emu/Io/Null/NullMouseHandler.h" #include "Emu/Io/Null/NullPadHandler.h" @@ -18,31 +17,7 @@ struct rCanvas void *handle; }; -//struct rGLContext -//{ -// rGLContext(); -// rGLContext(rGLContext &) = delete; -// rGLContext(rCanvas *canvas); -// ~rGLContext(); -// -// void *handle; -//}; - -//struct rFrame -//{ -// rFrame(); -// rFrame(rFrame &) = delete; -// ~rFrame(); -// -// void Close(); -// bool IsShown(); -// void Hide(); -// void Show(); -// -// void *handle; -//}; - -struct rGLFrame/*: public rFrame*/ +struct rGLFrame { rGLFrame(); rGLFrame(const rGLFrame &) = delete; @@ -56,7 +31,6 @@ struct rGLFrame/*: public rFrame*/ void *handle; void SetCurrent( void *ctx); - //rCanvas *GetCanvas(); void *GetNewContext(); void Flip(/*rGLContext*/void *ctx); }; diff --git a/Utilities/rTime.cpp b/Utilities/rTime.cpp index aac6d514ab..21aba77740 100644 --- a/Utilities/rTime.cpp +++ b/Utilities/rTime.cpp @@ -47,31 +47,6 @@ rDateSpan::rDateSpan(int a, int b, int c, int d) handle = static_cast(new wxDateSpan(a,b,c,d)); } - //enum TZ - //{ - // Local, GMT, UTC - //}; - //enum Calender - //{ - // Gregorian - //}; - - //struct rTimeZone - //{ - // rTimeZone(); - // rTimeZone(rDateTime::TZ timezone); - //}; - //struct WeekDay - //{ - // WeekDay(); - // WeekDay(int a); - //}; - //struct Month - //{ - // Month(); - // Month(int a); - //}; - rDateTime::rDateTime() { handle = static_cast(new wxDateTime()); @@ -143,11 +118,6 @@ void rDateTime::Add(const rDateSpan& span) static_cast(handle)->Add(*static_cast(span.handle)); } -//void rDateTime::Close() -//{ -// static_cast(handle)->Close(); -//} - wxDateTime::TimeZone convertTZ(rDateTime::rTimeZone tz) { switch (tz) @@ -170,7 +140,7 @@ std::string rDateTime::Format(const std::string &format, const rTimeZone &tz) co void rDateTime::ParseDateTime(const std::string & format) { - /*return fmt::ToUTF8(*/static_cast(handle)->ParseDateTime(fmt::FromUTF8(format)); + static_cast(handle)->ParseDateTime(fmt::FromUTF8(format)); } u32 rDateTime::GetAsDOS() diff --git a/asmjitsrc/asmjit.vcxproj b/asmjitsrc/asmjit.vcxproj index 67b4f55262..28da0c7bdb 100644 --- a/asmjitsrc/asmjit.vcxproj +++ b/asmjitsrc/asmjit.vcxproj @@ -69,14 +69,14 @@ StaticLibrary false v120 - false + true Unicode StaticLibrary false v120 - false + true Unicode @@ -151,9 +151,6 @@ true true - - false - @@ -169,9 +166,6 @@ true true - - false - diff --git a/rpcs3.sln b/rpcs3.sln index c1eece25ed..fbf2e2cd4e 100644 --- a/rpcs3.sln +++ b/rpcs3.sln @@ -1,8 +1,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2013 VisualStudioVersion = 12.0.21005.1 -# Visual Studio Express 2013 for Windows Desktop -VisualStudioVersion = 12.0.30501.0 MinimumVisualStudioVersion = 10.0.40219.1 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rpcs3", "rpcs3\rpcs3.vcxproj", "{70CD65B0-91D6-4FAE-9A7B-4AF55D0D1B12}" ProjectSection(ProjectDependencies) = postProject diff --git a/rpcs3/Emu/Cell/PPUInterpreter.h b/rpcs3/Emu/Cell/PPUInterpreter.h index f2d9e732c0..c8e5960d21 100644 --- a/rpcs3/Emu/Cell/PPUInterpreter.h +++ b/rpcs3/Emu/Cell/PPUInterpreter.h @@ -4,7 +4,6 @@ #include "Emu/Memory/Memory.h" #include "Emu/Cell/PPUThread.h" #include "Emu/SysCalls/SysCalls.h" -//#include "rpcs3.h" //GUI dependency #include #ifdef _MSC_VER #include diff --git a/rpcs3/Emu/Cell/PPUThread.h b/rpcs3/Emu/Cell/PPUThread.h index 4e33741965..57b65474aa 100644 --- a/rpcs3/Emu/Cell/PPUThread.h +++ b/rpcs3/Emu/Cell/PPUThread.h @@ -2,7 +2,6 @@ #define PPUTHREAD_H #include "Emu/Cell/PPCThread.h" #include "Emu/SysCalls/SysCalls.h" -//#include "rpcs3.h" //GUI dependency #include enum diff --git a/rpcs3/Emu/DbgConsole.h b/rpcs3/Emu/DbgConsole.h index 83ea344da6..5775f98865 100644 --- a/rpcs3/Emu/DbgConsole.h +++ b/rpcs3/Emu/DbgConsole.h @@ -2,62 +2,6 @@ #include //for memset -//struct _DbgBuffer : public MTPacketBuffer -//{ -// _DbgBuffer() : MTPacketBuffer(1024) -// { -// } -// -// void _push(const DbgPacket& data) -// { -// const u32 stext = data.m_text.length(); -// -// m_buffer.resize(m_buffer.size() + sizeof(int) + sizeof(u32) + stext); -// -// u32 c_put = m_put; -// -// memcpy(&m_buffer[c_put], &data.m_ch, sizeof(int)); -// c_put += sizeof(int); -// -// memcpy(&m_buffer[c_put], &stext, sizeof(u32)); -// c_put += sizeof(u32); -// memcpy(&m_buffer[c_put], data.m_text.data(), stext); -// c_put += stext; -// -// m_put = c_put; -// CheckBusy(); -// } -// -// DbgPacket _pop() -// { -// DbgPacket ret; -// -// u32 c_get = m_get; -// -// ret.m_ch = *(int*)&m_buffer[c_get]; -// c_get += sizeof(int); -// -// const u32& stext = *(u32*)&m_buffer[c_get]; -// c_get += sizeof(u32); -// if (stext) ret.m_text = std::string(reinterpret_cast(&m_buffer[c_get]), stext ); -// c_get += stext; -// -// m_get = c_get; -// if(!HasNewPacket()) Flush(); -// -// return ret; -// } -//}; -// -//struct DbgConsole -//{ -// void *congui; -// DbgConsole(); -// void Close(); -// void Clear(); -// void Write(int ch, const std::string &msg); -//}; - struct DbgPacket { int m_ch; diff --git a/rpcs3/Emu/GS/GL/GLGSRender.cpp b/rpcs3/Emu/GS/GL/GLGSRender.cpp index 7fdcd7e19c..af45cda7fb 100644 --- a/rpcs3/Emu/GS/GL/GLGSRender.cpp +++ b/rpcs3/Emu/GS/GL/GLGSRender.cpp @@ -608,9 +608,8 @@ void GLGSRender::OnInit() void GLGSRender::OnInitThread() { - m_context = m_frame->GetNewContext();//new rGLContext(m_frame->GetCanvas()); + m_context = m_frame->GetNewContext(); - //m_frame->GetCanvas()->SetCurrent(*m_context); m_frame->SetCurrent(m_context); InitProcTable(); diff --git a/rpcs3/Emu/Io/Pad.cpp b/rpcs3/Emu/Io/Pad.cpp index 41d4b7ca43..eea1e552c7 100644 --- a/rpcs3/Emu/Io/Pad.cpp +++ b/rpcs3/Emu/Io/Pad.cpp @@ -3,14 +3,6 @@ #include "rpcs3/Ini.h" #include "Pad.h" #include "Null/NullPadHandler.h" -#ifdef wxGUI -#include "Windows/WindowsPadHandler.h" -#include "rpcs3.h" -#if defined(_WIN32) -#include "XInput/XInputPadHandler.h" -#endif -#endif - PadManager::PadManager() : m_pad_handler(nullptr) diff --git a/rpcs3/Emu/SysCalls/Modules.cpp b/rpcs3/Emu/SysCalls/Modules.cpp index 158b451466..590063f397 100644 --- a/rpcs3/Emu/SysCalls/Modules.cpp +++ b/rpcs3/Emu/SysCalls/Modules.cpp @@ -110,15 +110,12 @@ void Module::UnLoad() bool Module::Load(u32 id) { - //std::lock_guard lock(g_funcs_lock); - if(Emu.GetModuleManager().IsLoadedFunc(id)) return false; for(u32 i=0; iid == id) { - //g_modules_funcs_list.push_back(m_funcs_list[i]); Emu.GetModuleManager().AddFunc(m_funcs_list[i]); return true; } diff --git a/rpcs3/Emu/System.h b/rpcs3/Emu/System.h index c967e66de8..ad43f078ac 100644 --- a/rpcs3/Emu/System.h +++ b/rpcs3/Emu/System.h @@ -14,8 +14,6 @@ class EventManager; class ModuleManager; class StaticFuncManager; -//class CPUThreadManager; -//class CPUThread; struct EmuInfo { @@ -75,8 +73,6 @@ class Emulator u32 m_rsx_callback; u32 m_ppu_thr_exit; - //MemoryViewerPanel* m_memory_viewer; //GUI dependency - //ArrayF m_cpu_threads; std::vector> m_modules_init; std::vector m_break_points; diff --git a/rpcs3/stdafx.h b/rpcs3/stdafx.h index 2a55bac8f1..16c34d9301 100644 --- a/rpcs3/stdafx.h +++ b/rpcs3/stdafx.h @@ -10,11 +10,7 @@ #define SARRSIZEOF(array) (sizeof(array)/sizeof(array[0])) #define NOMINMAX -//#ifdef wxGUI #ifndef QT_UI -#ifdef _WIN32 -//#include -#endif #include #include #include @@ -44,7 +40,6 @@ #include #endif -//#endif #ifdef MSVC_CRT_MEMLEAK_DETECTION #ifdef _DEBUG @@ -55,11 +50,6 @@ #endif // _DEBUG #endif // MSVC_CRT_MEMLEAK_DETECTION -#ifndef _WIN32 -//hack, disabled -//#define wx_str() ToStdString().c_str() -#endif - #include typedef unsigned int uint; @@ -300,8 +290,6 @@ enum Status #include "Emu/System.h" #include "Emu/SysCalls/Callback.h" #include "Emu/DbgCommand.h" -//#ifdef wxGUI -//#endif #include "Emu/Cell/PPUThread.h" #include "Emu/SysCalls/SC_FUNC.h" #include "Emu/SysCalls/Modules.h" @@ -315,7 +303,6 @@ enum Status #include "Emu/FS/vfsStreamMemory.h" #include "Emu/FS/vfsFile.h" #include "Emu/FS/vfsDir.h" -//#ifdef wxGUI #include "rpcs3.h" #define _PRGNAME_ "RPCS3"