From dbb24cbd5f00431bbc8d497c7f4d19100f6c36e9 Mon Sep 17 00:00:00 2001 From: Gerasim Troeglazov <3dEyes@gmail.com> Date: Sat, 22 Sep 2018 20:49:57 +1000 Subject: [PATCH] PPSSPP: switch to git source * git version more stable on Haiku * fix crash on postprocess shader fx --- .../ppsspp/patches/ppsspp-1.6.3.patchset | 346 ------------------ .../ppsspp/patches/ppsspp-1.6.3~git.patchset | 212 +++++++++++ ...p-1.6.3.recipe => ppsspp-1.6.3~git.recipe} | 43 +-- 3 files changed, 234 insertions(+), 367 deletions(-) delete mode 100644 games-emulation/ppsspp/patches/ppsspp-1.6.3.patchset create mode 100644 games-emulation/ppsspp/patches/ppsspp-1.6.3~git.patchset rename games-emulation/ppsspp/{ppsspp-1.6.3.recipe => ppsspp-1.6.3~git.recipe} (69%) diff --git a/games-emulation/ppsspp/patches/ppsspp-1.6.3.patchset b/games-emulation/ppsspp/patches/ppsspp-1.6.3.patchset deleted file mode 100644 index e1c3de20d..000000000 --- a/games-emulation/ppsspp/patches/ppsspp-1.6.3.patchset +++ /dev/null @@ -1,346 +0,0 @@ -From 498bb436e9d4f9792e8926569e9820b1d55d9620 Mon Sep 17 00:00:00 2001 -From: Gerasim Troeglazov <3dEyes@gmail.com> -Date: Fri, 21 Sep 2018 22:38:59 +1000 -Subject: Fixes for Haiku - - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index e26ebe2..f0a080b 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -74,8 +74,12 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Android") - set(ANDROID ON) - endif() - -+if(${CMAKE_SYSTEM_NAME} MATCHES "Haiku") -+ set(HAIKU ON) -+endif() -+ - # We only support Vulkan on Unix, Android and Windows. --if(ANDROID OR WIN32 OR (UNIX AND NOT APPLE)) -+if(ANDROID OR WIN32 OR (UNIX AND NOT APPLE AND NOT HAIKU)) - set(VULKAN ON) - else() - add_definitions(-DNO_VULKAN) -@@ -123,7 +127,7 @@ option(USE_SYSTEM_LIBZIP "Dynamically link against system libzip" ${USE_SYSTEM_L - option(USE_WAYLAND_WSI "Set to ON to require Wayland support for Vulkan" ${USE_WAYLAND_WSI}) - option(USE_ADDRESS_SANITIZER "Use Clang memory sanitizer" ${USE_ADDRESS_SANITIZER}) - --if(UNIX AND NOT (APPLE OR ANDROID) AND VULKAN) -+if(UNIX AND NOT (APPLE OR ANDROID OR HAIKU) AND VULKAN) - add_definitions(-DVK_USE_PLATFORM_XLIB_KHR) - # add_definitions(-DVK_USE_PLATFORM_XCB_KHR) - find_package(Wayland) -@@ -815,12 +819,20 @@ elseif(TARGET SDL2::SDL2) - set(TargetBin PPSSPPSDL) - # Require SDL - add_definitions(-DSDL) -- set(nativeExtra ${nativeExtra} -- SDL/SDLJoystick.h -- SDL/SDLJoystick.cpp -- SDL/SDLMain.cpp -- SDL/SDLGLGraphicsContext.cpp -- SDL/SDLVulkanGraphicsContext.cpp) -+ if(HAIKU) -+ set(nativeExtra ${nativeExtra} -+ SDL/SDLJoystick.h -+ SDL/SDLJoystick.cpp -+ SDL/SDLMain.cpp -+ SDL/SDLGLGraphicsContext.cpp) -+ else() -+ set(nativeExtra ${nativeExtra} -+ SDL/SDLJoystick.h -+ SDL/SDLJoystick.cpp -+ SDL/SDLMain.cpp -+ SDL/SDLGLGraphicsContext.cpp -+ SDL/SDLVulkanGraphicsContext.cpp) -+ endif() - set(nativeExtraLibs ${nativeExtraLibs} SDL2::SDL2) - if(APPLE) - set(nativeExtra ${nativeExtra} SDL/SDLMain.h SDL/SDLMain.mm) -@@ -882,13 +894,15 @@ set(THIN3D_PLATFORMS ext/native/thin3d/thin3d_gl.cpp - ext/native/thin3d/DataFormatGL.cpp - ext/native/thin3d/DataFormatGL.h) - --set(THIN3D_PLATFORMS ${THIN3D_PLATFORMS} -- ext/native/thin3d/thin3d_vulkan.cpp -- ext/native/thin3d/VulkanRenderManager.cpp -- ext/native/thin3d/VulkanRenderManager.h -- ext/native/thin3d/VulkanQueueRunner.cpp -- ext/native/thin3d/VulkanQueueRunner.h -- ext/native/thin3d/DataFormat.h) -+if(NOT HAIKU) -+ set(THIN3D_PLATFORMS ${THIN3D_PLATFORMS} -+ ext/native/thin3d/thin3d_vulkan.cpp -+ ext/native/thin3d/VulkanRenderManager.cpp -+ ext/native/thin3d/VulkanRenderManager.h -+ ext/native/thin3d/VulkanQueueRunner.cpp -+ ext/native/thin3d/VulkanQueueRunner.h -+ ext/native/thin3d/DataFormat.h) -+endif() - - if(WIN32) - set(THIN3D_PLATFORMS ${THIN3D_PLATFORMS} -@@ -1071,6 +1085,8 @@ if(ANDROID) - target_link_libraries(native log EGL OpenSLES) - elseif(WIN32) - target_link_libraries(native ws2_32 winmm) -+elseif(HAIKU) -+ target_link_libraries(native network) - endif() - setup_target_project(native native) - -diff --git a/SDL/SDLMain.cpp b/SDL/SDLMain.cpp -index 6517748..6bcb262 100644 ---- a/SDL/SDLMain.cpp -+++ b/SDL/SDLMain.cpp -@@ -259,7 +259,7 @@ void LaunchBrowser(const char *url) { - #elif defined(_WIN32) - std::wstring wurl = ConvertUTF8ToWString(url); - ShellExecute(NULL, L"open", wurl.c_str(), NULL, NULL, SW_SHOWNORMAL); --#elif defined(__APPLE__) -+#elif defined(__APPLE__) || defined(__HAIKU__) - std::string command = std::string("open ") + url; - system(command.c_str()); - #else -@@ -277,7 +277,7 @@ void LaunchMarket(const char *url) { - #elif defined(_WIN32) - std::wstring wurl = ConvertUTF8ToWString(url); - ShellExecute(NULL, L"open", wurl.c_str(), NULL, NULL, SW_SHOWNORMAL); --#elif defined(__APPLE__) -+#elif defined(__APPLE__) || defined(__HAIKU__) - std::string command = std::string("open ") + url; - system(command.c_str()); - #else -@@ -295,7 +295,7 @@ void LaunchEmail(const char *email_address) { - #elif defined(_WIN32) - std::wstring mailto = std::wstring(L"mailto:") + ConvertUTF8ToWString(email_address); - ShellExecute(NULL, L"open", mailto.c_str(), NULL, NULL, SW_SHOWNORMAL); --#elif defined(__APPLE__) -+#elif defined(__APPLE__) || defined(__HAIKU__) - std::string command = std::string("open mailto:") + email_address; - system(command.c_str()); - #else -@@ -314,6 +314,8 @@ std::string System_GetProperty(SystemProperty prop) { - return "SDL:Windows"; - #elif __linux__ - return "SDL:Linux"; -+#elif __HAIKU__ -+ return "SDL:Haiku"; - #elif __APPLE__ - return "SDL:OSX"; - #else -@@ -455,6 +457,23 @@ int main(int argc, char *argv[]) { - } - } - -+#ifdef __HAIKU__ -+ char abs_exe_path[PATH_MAX]; -+ char path_save[PATH_MAX]; -+ char *p; -+ -+ if(!(p = strrchr(argv[0], '/'))) { -+ getcwd(abs_exe_path, sizeof(abs_exe_path)); -+ } else { -+ *p = '\0'; -+ getcwd(path_save, sizeof(path_save)); -+ chdir(argv[0]); -+ getcwd(abs_exe_path, sizeof(abs_exe_path)); -+ chdir(path_save); -+ } -+ chdir(abs_exe_path); -+#endif -+ - glslang::InitializeProcess(); - - #if PPSSPP_PLATFORM(RPI) -@@ -634,6 +653,7 @@ int main(int argc, char *argv[]) { - printf("GL init error '%s'\n", error_message.c_str()); - } - graphicsContext = ctx; -+#ifndef __HAIKU__ - } else if (g_Config.iGPUBackend == (int)GPUBackend::VULKAN) { - SDLVulkanGraphicsContext *ctx = new SDLVulkanGraphicsContext(); - if (!ctx->Init(window, x, y, mode, &error_message)) { -@@ -647,6 +667,7 @@ int main(int argc, char *argv[]) { - } else { - graphicsContext = ctx; - } -+#endif - } - - bool useEmuThread = g_Config.iGPUBackend == (int)GPUBackend::OPENGL; -diff --git a/UI/NativeApp.cpp b/UI/NativeApp.cpp -index 7130c7d..d021b37 100644 ---- a/UI/NativeApp.cpp -+++ b/UI/NativeApp.cpp -@@ -388,6 +388,9 @@ void NativeInit(int argc, const char *argv[], const char *savegame_dir, const ch - // most sense. - g_Config.memStickDirectory = std::string(external_dir) + "/"; - g_Config.flash0Directory = std::string(external_dir) + "/flash0/"; -+#elif defined(__HAIKU__) -+ g_Config.memStickDirectory = "/boot/home/config/settings/ppsspp/"; -+ g_Config.flash0Directory = File::GetExeDirectory() + "/assets/flash0/"; - #elif defined(IOS) - g_Config.memStickDirectory = user_data_path; - g_Config.flash0Directory = std::string(external_dir) + "/flash0/"; --- -2.19.0 - - -From 9d1b4021bb324e49785fc4176b3cfd69f91d92de Mon Sep 17 00:00:00 2001 -From: Gerasim Troeglazov <3dEyes@gmail.com> -Date: Fri, 21 Sep 2018 22:39:43 +1000 -Subject: Upstremed patchset for new ffmpeg support - - -diff --git a/Core/HW/MediaEngine.cpp b/Core/HW/MediaEngine.cpp -index cf82e94..62832f6 100644 ---- a/Core/HW/MediaEngine.cpp -+++ b/Core/HW/MediaEngine.cpp -@@ -455,6 +455,14 @@ bool MediaEngine::setVideoStream(int streamNum, bool force) { - return false; - } - AVCodecContext *m_pCodecCtx = m_pFormatCtx->streams[streamNum]->codec; -+#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(57,33,100) -+ AVCodecParameters *m_pCodecPar = m_pFormatCtx->streams[streamNum]->codecpar; -+ -+ // Update from deprecated public codec context -+ if (avcodec_parameters_from_context(m_pCodecPar, m_pCodecCtx) < 0) { -+ return false; -+ } -+#endif - - // Find the decoder for the video stream - AVCodec *pCodec = avcodec_find_decoder(m_pCodecCtx->codec_id); -@@ -766,9 +774,8 @@ int MediaEngine::writeVideoImage(u32 bufferPtr, int frameWidth, int videoPixelMo - delete [] imgbuf; - } - --#ifndef MOBILE_DEVICE - CBreakPoints::ExecMemCheck(bufferPtr, true, videoImageSize, currentMIPS->pc); --#endif -+ - return videoImageSize; - #endif // USE_FFMPEG - return 0; -@@ -822,9 +829,7 @@ int MediaEngine::writeVideoImageWithRange(u32 bufferPtr, int frameWidth, int vid - writeVideoLineRGBA(imgbuf, data, width); - data += m_desWidth * sizeof(u32); - imgbuf += videoLineSize; --#ifndef MOBILE_DEVICE - CBreakPoints::ExecMemCheck(bufferPtr + y * frameWidth * sizeof(u32), true, width * sizeof(u32), currentMIPS->pc); --#endif - } - break; - -@@ -834,9 +839,7 @@ int MediaEngine::writeVideoImageWithRange(u32 bufferPtr, int frameWidth, int vid - writeVideoLineABGR5650(imgbuf, data, width); - data += m_desWidth * sizeof(u16); - imgbuf += videoLineSize; --#ifndef MOBILE_DEVICE - CBreakPoints::ExecMemCheck(bufferPtr + y * frameWidth * sizeof(u16), true, width * sizeof(u16), currentMIPS->pc); --#endif - } - break; - -@@ -846,9 +849,7 @@ int MediaEngine::writeVideoImageWithRange(u32 bufferPtr, int frameWidth, int vid - writeVideoLineABGR5551(imgbuf, data, width); - data += m_desWidth * sizeof(u16); - imgbuf += videoLineSize; --#ifndef MOBILE_DEVICE - CBreakPoints::ExecMemCheck(bufferPtr + y * frameWidth * sizeof(u16), true, width * sizeof(u16), currentMIPS->pc); --#endif - } - break; - -@@ -858,9 +859,7 @@ int MediaEngine::writeVideoImageWithRange(u32 bufferPtr, int frameWidth, int vid - writeVideoLineABGR4444(imgbuf, data, width); - data += m_desWidth * sizeof(u16); - imgbuf += videoLineSize; --#ifndef MOBILE_DEVICE - CBreakPoints::ExecMemCheck(bufferPtr + y * frameWidth * sizeof(u16), true, width * sizeof(u16), currentMIPS->pc); --#endif - } - break; - -@@ -954,9 +953,8 @@ int MediaEngine::getAudioSamples(u32 bufferPtr) { - if (!m_audioContext->Decode(audioFrame, frameSize, buffer, &outbytes)) { - ERROR_LOG(ME, "Audio (%s) decode failed during video playback", GetCodecName(m_audioType)); - } --#ifndef MOBILE_DEVICE -+ - CBreakPoints::ExecMemCheck(bufferPtr, true, outbytes, currentMIPS->pc); --#endif - } - - return 0x2000; --- -2.19.0 - - -From 5dcc808fa8bebf4d0edd18b4242e07186c5a0c2d Mon Sep 17 00:00:00 2001 -From: Gerasim Troeglazov <3dEyes@gmail.com> -Date: Sat, 22 Sep 2018 13:01:07 +1000 -Subject: Tune default settings for Haiku - - -diff --git a/Core/Config.cpp b/Core/Config.cpp -index e2bde29..36b8e37 100644 ---- a/Core/Config.cpp -+++ b/Core/Config.cpp -@@ -432,7 +432,7 @@ static int DefaultRenderingMode() { - - static int DefaultInternalResolution() { - // Auto on Windows, 2x on large screens, 1x elsewhere. --#if defined(USING_WIN_UI) -+#if defined(USING_WIN_UI) || defined(__HAIKU__) - return 0; - #else - int longestDisplaySide = std::max(System_GetPropertyInt(SYSPROP_DISPLAY_XRES), System_GetPropertyInt(SYSPROP_DISPLAY_YRES)); -@@ -516,7 +516,11 @@ static ConfigSetting graphicsSettings[] = { - ReportedConfigSetting("InternalResolution", &g_Config.iInternalResolution, &DefaultInternalResolution, true, true), - ReportedConfigSetting("AndroidHwScale", &g_Config.iAndroidHwScale, &DefaultAndroidHwScale), - ReportedConfigSetting("HighQualityDepth", &g_Config.bHighQualityDepth, true, true, true), -+#ifdef __HAIKU__ -+ ReportedConfigSetting("FrameSkip", &g_Config.iFrameSkip, 1, true, true), -+#else - ReportedConfigSetting("FrameSkip", &g_Config.iFrameSkip, 0, true, true), -+#endif - ReportedConfigSetting("AutoFrameSkip", &g_Config.bAutoFrameSkip, false, true, true), - ConfigSetting("FrameRate", &g_Config.iFpsLimit, 0, true, true), - ConfigSetting("FrameSkipUnthrottle", &g_Config.bFrameSkipUnthrottle, &DefaultFrameskipUnthrottle, true, false), -@@ -526,10 +530,17 @@ static ConfigSetting graphicsSettings[] = { - ReportedConfigSetting("ForceMaxEmulatedFPS", &g_Config.iForceMaxEmulatedFPS, 60, true, true), - - // Most low-performance (and many high performance) mobile GPUs do not support aniso anyway so defaulting to 4 is fine. -+#ifdef __HAIKU__ -+ ConfigSetting("AnisotropyLevel", &g_Config.iAnisotropyLevel, 0, true, true), -+#else - ConfigSetting("AnisotropyLevel", &g_Config.iAnisotropyLevel, 4, true, true), -- -+#endif - ReportedConfigSetting("VertexDecCache", &g_Config.bVertexCache, &DefaultVertexCache, true, true), -+#ifdef __HAIKU__ -+ ReportedConfigSetting("TextureBackoffCache", &g_Config.bTextureBackoffCache, true, true, true), -+#else - ReportedConfigSetting("TextureBackoffCache", &g_Config.bTextureBackoffCache, false, true, true), -+#endif - ReportedConfigSetting("TextureSecondaryCache", &g_Config.bTextureSecondaryCache, false, true, true), - ReportedConfigSetting("VertexDecJit", &g_Config.bVertexDecoderJit, &DefaultCodeGen, false), - -@@ -563,7 +574,11 @@ static ConfigSetting graphicsSettings[] = { - ReportedConfigSetting("PostShader", &g_Config.sPostShaderName, "Off", true, true), - - ReportedConfigSetting("MemBlockTransferGPU", &g_Config.bBlockTransferGPU, true, true, true), -+#ifdef __HAIKU__ -+ ReportedConfigSetting("DisableSlowFramebufEffects", &g_Config.bDisableSlowFramebufEffects, true, true, true), -+#else - ReportedConfigSetting("DisableSlowFramebufEffects", &g_Config.bDisableSlowFramebufEffects, false, true, true), -+#endif - ReportedConfigSetting("FragmentTestCache", &g_Config.bFragmentTestCache, true, true, true), - - ConfigSetting("GfxDebugOutput", &g_Config.bGfxDebugOutput, false, false, false), --- -2.19.0 - diff --git a/games-emulation/ppsspp/patches/ppsspp-1.6.3~git.patchset b/games-emulation/ppsspp/patches/ppsspp-1.6.3~git.patchset new file mode 100644 index 000000000..dbed2b11e --- /dev/null +++ b/games-emulation/ppsspp/patches/ppsspp-1.6.3~git.patchset @@ -0,0 +1,212 @@ +From 9361d6cabcfab31e3490c5bb2ab5431591c0b809 Mon Sep 17 00:00:00 2001 +From: Gerasim Troeglazov <3dEyes@gmail.com> +Date: Sat, 22 Sep 2018 20:20:53 +1000 +Subject: Fixes for Haiku + + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 82d3034..e6ea7dc 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -88,8 +88,12 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Android") + set(ANDROID ON) + endif() + ++if(${CMAKE_SYSTEM_NAME} MATCHES "Haiku") ++ set(HAIKU ON) ++endif() ++ + # We only support Vulkan on Unix, Android and Windows. +-if(ANDROID OR WIN32 OR (UNIX AND NOT APPLE AND NOT ARM_NO_VULKAN)) ++if(ANDROID OR WIN32 OR (UNIX AND NOT APPLE AND NOT ARM_NO_VULKAN AND NOT HAIKU)) + set(VULKAN ON) + endif() + +@@ -137,7 +141,7 @@ option(USE_SYSTEM_LIBZIP "Dynamically link against system libzip" ${USE_SYSTEM_L + option(USE_WAYLAND_WSI "Set to ON to require Wayland support for Vulkan" ${USE_WAYLAND_WSI}) + option(USE_ADDRESS_SANITIZER "Use Clang memory sanitizer" ${USE_ADDRESS_SANITIZER}) + +-if(UNIX AND NOT (APPLE OR ANDROID) AND VULKAN) ++if(UNIX AND NOT (APPLE OR ANDROID OR HAIKU) AND VULKAN) + if(USING_X11_VULKAN) + message("Using X11 for Vulkan") + add_definitions(-DVK_USE_PLATFORM_XLIB_KHR) +@@ -1770,7 +1774,7 @@ if(FFmpeg_FOUND) + endif() + + # Discord integration +-if(NOT IOS) ++if(NOT IOS AND NOT HAIKU) + target_link_libraries(${CoreLibName} discord-rpc) + endif() + +@@ -1883,6 +1887,10 @@ set(WindowsFiles + + list(APPEND LinkCommon ${CoreLibName} ${CMAKE_THREAD_LIBS_INIT}) + ++if(HAIKU) ++ list(APPEND LinkCommon network) ++endif() ++ + if(WIN32) + list(APPEND LinkCommon kernel32 user32 gdi32 shell32 comctl32 dsound xinput d3d9 winmm dinput8 ole32 winspool ksuser) + #setup_target_project(${TargetBin} Windows) +diff --git a/SDL/SDLMain.cpp b/SDL/SDLMain.cpp +index 6dd6d22..b3be204 100644 +--- a/SDL/SDLMain.cpp ++++ b/SDL/SDLMain.cpp +@@ -128,7 +128,7 @@ void LaunchBrowser(const char *url) { + #elif defined(_WIN32) + std::wstring wurl = ConvertUTF8ToWString(url); + ShellExecute(NULL, L"open", wurl.c_str(), NULL, NULL, SW_SHOWNORMAL); +-#elif defined(__APPLE__) ++#elif defined(__APPLE__) || defined(__HAIKU__) + std::string command = std::string("open ") + url; + system(command.c_str()); + #else +@@ -146,7 +146,7 @@ void LaunchMarket(const char *url) { + #elif defined(_WIN32) + std::wstring wurl = ConvertUTF8ToWString(url); + ShellExecute(NULL, L"open", wurl.c_str(), NULL, NULL, SW_SHOWNORMAL); +-#elif defined(__APPLE__) ++#elif defined(__APPLE__) || defined(__HAIKU__) + std::string command = std::string("open ") + url; + system(command.c_str()); + #else +@@ -164,7 +164,7 @@ void LaunchEmail(const char *email_address) { + #elif defined(_WIN32) + std::wstring mailto = std::wstring(L"mailto:") + ConvertUTF8ToWString(email_address); + ShellExecute(NULL, L"open", mailto.c_str(), NULL, NULL, SW_SHOWNORMAL); +-#elif defined(__APPLE__) ++#elif defined(__APPLE__) || defined(__HAIKU__) + std::string command = std::string("open mailto:") + email_address; + system(command.c_str()); + #else +@@ -185,6 +185,8 @@ std::string System_GetProperty(SystemProperty prop) { + return "SDL:Linux"; + #elif __APPLE__ + return "SDL:OSX"; ++#elif __HAIKU__ ++ return "SDL:Haiku"; + #else + return "SDL:"; + #endif +@@ -339,6 +341,23 @@ int main(int argc, char *argv[]) { + } + } + ++#ifdef __HAIKU__ ++ char abs_exe_path[PATH_MAX]; ++ char path_save[PATH_MAX]; ++ char *p; ++ ++ if(!(p = strrchr(argv[0], '/'))) { ++ getcwd(abs_exe_path, sizeof(abs_exe_path)); ++ } else { ++ *p = '\0'; ++ getcwd(path_save, sizeof(path_save)); ++ chdir(argv[0]); ++ getcwd(abs_exe_path, sizeof(abs_exe_path)); ++ chdir(path_save); ++ } ++ chdir(abs_exe_path); ++#endif ++ + glslang::InitializeProcess(); + + #if PPSSPP_PLATFORM(RPI) +diff --git a/UI/NativeApp.cpp b/UI/NativeApp.cpp +index 00bf8a3..278d855 100644 +--- a/UI/NativeApp.cpp ++++ b/UI/NativeApp.cpp +@@ -452,6 +452,9 @@ void NativeInit(int argc, const char *argv[], const char *savegame_dir, const ch + // most sense. + g_Config.memStickDirectory = std::string(external_dir) + "/"; + g_Config.flash0Directory = std::string(external_dir) + "/flash0/"; ++#elif defined(__HAIKU__) ++ g_Config.memStickDirectory = "/boot/home/config/settings/ppsspp/"; ++ g_Config.flash0Directory = File::GetExeDirectory() + "/assets/flash0/"; + #elif defined(IOS) + g_Config.memStickDirectory = user_data_path; + g_Config.flash0Directory = std::string(external_dir) + "/flash0/"; +diff --git a/ext/CMakeLists.txt b/ext/CMakeLists.txt +index ade6594..0c85ffa 100644 +--- a/ext/CMakeLists.txt ++++ b/ext/CMakeLists.txt +@@ -12,6 +12,6 @@ add_subdirectory(glslang) + add_subdirectory(snappy) + add_subdirectory(udis86) + add_subdirectory(SPIRV-Cross-build) +-if(NOT IOS) ++if(NOT IOS AND NOT HAIKU) + add_subdirectory(discord-rpc-build) + endif() +-- +2.19.0 + + +From 6babd0c990ba7903b5f35032dd43808cae45390f Mon Sep 17 00:00:00 2001 +From: Gerasim Troeglazov <3dEyes@gmail.com> +Date: Sat, 22 Sep 2018 20:21:20 +1000 +Subject: Tune default settings for Haiku + + +diff --git a/Core/Config.cpp b/Core/Config.cpp +index e2fd65c..0860562 100644 +--- a/Core/Config.cpp ++++ b/Core/Config.cpp +@@ -482,7 +482,7 @@ static int DefaultRenderingMode() { + + static int DefaultInternalResolution() { + // Auto on Windows, 2x on large screens, 1x elsewhere. +-#if defined(USING_WIN_UI) ++#if defined(USING_WIN_UI) || defined(__HAIKU__) + return 0; + #else + int longestDisplaySide = std::max(System_GetPropertyInt(SYSPROP_DISPLAY_XRES), System_GetPropertyInt(SYSPROP_DISPLAY_YRES)); +@@ -620,7 +620,11 @@ static ConfigSetting graphicsSettings[] = { + ReportedConfigSetting("InternalResolution", &g_Config.iInternalResolution, &DefaultInternalResolution, true, true), + ReportedConfigSetting("AndroidHwScale", &g_Config.iAndroidHwScale, &DefaultAndroidHwScale), + ReportedConfigSetting("HighQualityDepth", &g_Config.bHighQualityDepth, true, true, true), ++#ifdef __HAIKU__ ++ ReportedConfigSetting("FrameSkip", &g_Config.iFrameSkip, 2, true, true), ++#else + ReportedConfigSetting("FrameSkip", &g_Config.iFrameSkip, 0, true, true), ++#endif + ReportedConfigSetting("AutoFrameSkip", &g_Config.bAutoFrameSkip, false, true, true), + ConfigSetting("FrameRate", &g_Config.iFpsLimit1, 0, true, true), + ConfigSetting("FrameRate2", &g_Config.iFpsLimit2, -1, true, true), +@@ -631,10 +635,17 @@ static ConfigSetting graphicsSettings[] = { + ReportedConfigSetting("ForceMaxEmulatedFPS", &g_Config.iForceMaxEmulatedFPS, 60, true, true), + + // Most low-performance (and many high performance) mobile GPUs do not support aniso anyway so defaulting to 4 is fine. ++#ifdef __HAIKU__ ++ ConfigSetting("AnisotropyLevel", &g_Config.iAnisotropyLevel, 0, true, true), ++#else + ConfigSetting("AnisotropyLevel", &g_Config.iAnisotropyLevel, 4, true, true), +- ++#endif + ReportedConfigSetting("VertexDecCache", &g_Config.bVertexCache, &DefaultVertexCache, true, true), ++#ifdef __HAIKU__ ++ ReportedConfigSetting("TextureBackoffCache", &g_Config.bTextureBackoffCache, true, true, true), ++#else + ReportedConfigSetting("TextureBackoffCache", &g_Config.bTextureBackoffCache, false, true, true), ++#endif + ReportedConfigSetting("TextureSecondaryCache", &g_Config.bTextureSecondaryCache, false, true, true), + ReportedConfigSetting("VertexDecJit", &g_Config.bVertexDecoderJit, &DefaultCodeGen, false), + +@@ -668,7 +679,11 @@ static ConfigSetting graphicsSettings[] = { + ReportedConfigSetting("PostShader", &g_Config.sPostShaderName, "Off", true, true), + + ReportedConfigSetting("MemBlockTransferGPU", &g_Config.bBlockTransferGPU, true, true, true), ++#ifdef __HAIKU__ ++ ReportedConfigSetting("DisableSlowFramebufEffects", &g_Config.bDisableSlowFramebufEffects, true, true, true), ++#else + ReportedConfigSetting("DisableSlowFramebufEffects", &g_Config.bDisableSlowFramebufEffects, false, true, true), ++#endif + ReportedConfigSetting("FragmentTestCache", &g_Config.bFragmentTestCache, true, true, true), + + ConfigSetting("GfxDebugOutput", &g_Config.bGfxDebugOutput, false, false, false), +-- +2.19.0 + diff --git a/games-emulation/ppsspp/ppsspp-1.6.3.recipe b/games-emulation/ppsspp/ppsspp-1.6.3~git.recipe similarity index 69% rename from games-emulation/ppsspp/ppsspp-1.6.3.recipe rename to games-emulation/ppsspp/ppsspp-1.6.3~git.recipe index 16b2804cd..2d6670d3a 100644 --- a/games-emulation/ppsspp/ppsspp-1.6.3.recipe +++ b/games-emulation/ppsspp/ppsspp-1.6.3~git.recipe @@ -6,25 +6,26 @@ HOMEPAGE="https://www.ppsspp.org/" COPYRIGHT="2012-2018 PPSSPP Project" LICENSE="GNU GPL v2" REVISION="1" -SOURCE_URI="https://github.com/hrydgard/ppsspp/archive/v$portVersion.tar.gz" -CHECKSUM_SHA256="366f8b3c545071d919e1f51a5c4e0da48ba55cf1c15ff8d78a90985b3d5e8eb3" -SOURCE_FILENAME="ppsspp-$portVersion.tar.gz" -SOURCE_DIR="ppsspp-$portVersion" -srcVersion_2="0.10.0" -SOURCE_URI_2="https://github.com/Kingcom/armips/archive/v$srcVersion_2.tar.gz" -CHECKSUM_SHA256_2="73111ea551237dde5ff214c4fcbf6b87ef0b74906b404235b3eb0baa6d6c20b6" -SOURCE_FILENAME_2="armips-$srcVersion_2.tar.gz" -SOURCE_DIR_2="armips-$srcVersion_2" -srcVersion_3="7.9.2888" -SOURCE_URI_3="https://github.com/KhronosGroup/glslang/archive/$srcVersion_3.tar.gz" -CHECKSUM_SHA256_3="cb66779d0e6b5f07f0445bd58289a24e56e12693e71d75c8fae3db31ffacaf8c" -SOURCE_FILENAME_3="glslang-$srcVersion_3.tar.gz" -SOURCE_DIR_3="glslang-$srcVersion_3" -srcVersion_4="2018-08-07" -SOURCE_URI_4="https://github.com/KhronosGroup/SPIRV-Cross/archive/$srcVersion_4.tar.gz" -CHECKSUM_SHA256_4="3c1af25e808f81922c8a6e410b42ff595e02e3fda0b36df3446a393239a50ff7" -SOURCE_FILENAME_4="SPIRV-Cross-$srcVersion_4.tar.gz" -SOURCE_DIR_4="SPIRV-Cross-$srcVersion_4" +srcGitRev="ead4946fd2b879c5065c2469f257173478b44077" +SOURCE_URI="https://github.com/hrydgard/ppsspp/archive/$srcGitRev.tar.gz" +CHECKSUM_SHA256="adddda9f098617c9131025a3efe8fd09fdd85d5c551d275b80997714034c0405" +SOURCE_FILENAME="ppsspp-$srcGitRev.tar.gz" +SOURCE_DIR="ppsspp-$srcGitRev" +srcGitRev_2="9efe3367284d2d1eeb14fc302a2c12c36e3e255e" +SOURCE_URI_2="https://github.com/Kingcom/armips/archive/$srcGitRev_2.tar.gz" +CHECKSUM_SHA256_2="73b366f30e8f3863501723e13eb5dcaf6d424b80382d17c27635567b79705ca3" +SOURCE_FILENAME_2="armips-$srcGitRev_2.tar.gz" +SOURCE_DIR_2="armips-$srcGitRev_2" +srcGitRev_3="29619b2312f7bc862221749f3f4d37c3e6a0dee2" +SOURCE_URI_3="https://github.com/hrydgard/glslang/archive/$srcGitRev_3.tar.gz" +CHECKSUM_SHA256_3="5125620520d25f9a39c6d62dfcd3e087fd610dc5d163ddff6377365011c8b13f" +SOURCE_FILENAME_3="glslang-$srcGitRev_3.tar.gz" +SOURCE_DIR_3="glslang-$srcGitRev_3" +srcGitRev_4="be7425ef70231ab82930331959ab487d605d0482" +SOURCE_URI_4="https://github.com/KhronosGroup/SPIRV-Cross/archive/$srcGitRev_4.tar.gz" +CHECKSUM_SHA256_4="21afa0e32dd2d75ee51c4f5c0d16330a9d80d435d6ac9900d0c13bffdfd7b682" +SOURCE_FILENAME_4="SPIRV-Cross-$srcGitRev_4.tar.gz" +SOURCE_DIR_4="SPIRV-Cross-$srcGitRev_4" srcGitRev_5="2b15416501e64793204fc23fdf94c4365109198e" SOURCE_URI_5="https://github.com/hrydgard/ppsspp-lang/archive/$srcGitRev_5.tar.gz" CHECKSUM_SHA256_5="cb2cb6e8290dcee1ede21a73dafb5dabe6aae3d93db0525dc64b528b055a9fb5" @@ -84,7 +85,7 @@ BUILD() ln -s $sourceDir3 ext/glslang ln -s $sourceDir4 ext/SPIRV-Cross cp -rf $sourceDir5/*.ini assets/lang - sed -i "s|unknown| $portVersion|" git-version.cmake + sed -i "s|unknown| v$portVersion|" git-version.cmake mkdir -p build cd build @@ -102,7 +103,7 @@ INSTALL() local APP_SIGNATURE="application/x-vnd.ppsspp" local MAJOR="`echo "$portVersion" | cut -d. -f1`" local MIDDLE="`echo "$portVersion" | cut -d. -f2`" - local MINOR="`echo "$portVersion" | cut -d. -f3`" + local MINOR="`echo "$portVersion" | cut -d. -f3 | cut -d~ -f1`" local LONG_INFO="$SUMMARY" sed \ -e "s|@APP_SIGNATURE@|$APP_SIGNATURE|" \