From b317b2fedaced7ba2556886ff2ae51c63643f7d5 Mon Sep 17 00:00:00 2001 From: Ben Anderson Date: Sat, 29 Mar 2014 20:52:39 +1300 Subject: [PATCH 1/4] Commenting out all of this, should fix the pathing glitches on *nix, without breaking windows functionality. --- rpcs3/Emu/FS/vfsLocalFile.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/rpcs3/Emu/FS/vfsLocalFile.cpp b/rpcs3/Emu/FS/vfsLocalFile.cpp index 8dedb87532..104a11942b 100644 --- a/rpcs3/Emu/FS/vfsLocalFile.cpp +++ b/rpcs3/Emu/FS/vfsLocalFile.cpp @@ -35,19 +35,19 @@ bool vfsLocalFile::Open(const wxString& path, vfsOpenMode mode) { Close(); - if(m_device) - { - if(!m_file.Access(vfsDevice::GetWinPath(m_device->GetLocalPath(), path), vfs2wx_mode(mode))) return false; + // if(m_device) + // { + // if(!m_file.Access(vfsDevice::GetWinPath(m_device->GetLocalPath(), path), vfs2wx_mode(mode))) return false; - return m_file.Open(vfsDevice::GetWinPath(m_device->GetLocalPath(), path), vfs2wx_mode(mode)) && - vfsFileBase::Open(vfsDevice::GetPs3Path(m_device->GetPs3Path(), path), mode); - } - else - { + // return m_file.Open(vfsDevice::GetWinPath(m_device->GetLocalPath(), path), vfs2wx_mode(mode)) && + // vfsFileBase::Open(vfsDevice::GetPs3Path(m_device->GetPs3Path(), path), mode); + // } + // else + // { if(!m_file.Access(path, vfs2wx_mode(mode))) return false; return m_file.Open(path, vfs2wx_mode(mode)) && vfsFileBase::Open(path, mode); - } + // } } bool vfsLocalFile::Create(const wxString& path) From e24027eccb3525aede831396bf6abbbc519ee0b2 Mon Sep 17 00:00:00 2001 From: Ben Anderson Date: Sat, 29 Mar 2014 21:11:43 +1300 Subject: [PATCH 2/4] Added call to GlewInit() under *nix, should fix cairo display crashes. --- rpcs3/Emu/GS/GL/OpenGL.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rpcs3/Emu/GS/GL/OpenGL.cpp b/rpcs3/Emu/GS/GL/OpenGL.cpp index 8de1efdd79..8f02b7de59 100644 --- a/rpcs3/Emu/GS/GL/OpenGL.cpp +++ b/rpcs3/Emu/GS/GL/OpenGL.cpp @@ -39,6 +39,9 @@ void OpenGL::Init() #include "GLProcTable.tbl" #undef OPENGL_PROC #undef OPENGL_PROC2 +#elif __UNIX__ + glewExperimental = true; + glewInit(); #endif } From 84c93237509dde98abd8c4ad14d701bf2c88957a Mon Sep 17 00:00:00 2001 From: Ben Anderson Date: Sun, 30 Mar 2014 03:15:46 +1300 Subject: [PATCH 3/4] Fixes GL fix, which was broken. Added -g flag to cmake, so we can have debug builds. --- rpcs3/CMakeLists.txt | 1 + rpcs3/Emu/GS/GL/OpenGL.cpp | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/rpcs3/CMakeLists.txt b/rpcs3/CMakeLists.txt index f696f842f8..6139e73436 100644 --- a/rpcs3/CMakeLists.txt +++ b/rpcs3/CMakeLists.txt @@ -7,6 +7,7 @@ if (CMAKE_COMPILER_IS_GNUCXX) #add_definitions(-Wfatal-errors) add_definitions(-w) # TODO: remove me add_definitions(-fpermissive) # TODO: remove me + add_definitions(-g) # Debugging!! endif() set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules) diff --git a/rpcs3/Emu/GS/GL/OpenGL.cpp b/rpcs3/Emu/GS/GL/OpenGL.cpp index 8f02b7de59..4ecf8f8708 100644 --- a/rpcs3/Emu/GS/GL/OpenGL.cpp +++ b/rpcs3/Emu/GS/GL/OpenGL.cpp @@ -10,6 +10,10 @@ void InitProcTable() #undef OPENGL_PROC #undef OPENGL_PROC2 #endif +#ifdef __UNIX__ + glewExperimental = true; + glewInit(); +#endif } #ifdef _WIN32 @@ -39,9 +43,6 @@ void OpenGL::Init() #include "GLProcTable.tbl" #undef OPENGL_PROC #undef OPENGL_PROC2 -#elif __UNIX__ - glewExperimental = true; - glewInit(); #endif } From 33f7f37ca7b737f8de2bd4e04da28aebfcf91de1 Mon Sep 17 00:00:00 2001 From: Ben Anderson Date: Sun, 30 Mar 2014 03:21:41 +1300 Subject: [PATCH 4/4] Fixes null ptr in gcc, probably to do with operator precedence. @Bigpet was all over this one. --- rpcs3/Emu/SysCalls/Modules/cellPngDec.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpcs3/Emu/SysCalls/Modules/cellPngDec.cpp b/rpcs3/Emu/SysCalls/Modules/cellPngDec.cpp index 095ff1ed42..ed4c70514b 100644 --- a/rpcs3/Emu/SysCalls/Modules/cellPngDec.cpp +++ b/rpcs3/Emu/SysCalls/Modules/cellPngDec.cpp @@ -155,7 +155,7 @@ int cellPngDecDecodeData(u32 mainHandle, u32 subHandle, mem8_ptr_t data, const m //Decode PNG file. (TODO: Is there any faster alternative? Can we do it without external libraries?) int width, height, actual_components; - std::shared_ptr image(stbi_load_from_memory(png, fileSize, &width, &height, &actual_components, 4)); + std::shared_ptr image(stbi_load_from_memory(png.GetPtr(), fileSize, &width, &height, &actual_components, 4)); if (!image) return CELL_PNGDEC_ERROR_STREAM_FORMAT; uint image_size = width * height;