PPSSPP: bump version

This commit is contained in:
Gerasim Troeglazov
2020-07-04 14:50:23 +10:00
parent 2758c69cbc
commit 974a37fc63
2 changed files with 66 additions and 154 deletions

View File

@@ -1,22 +1,13 @@
From 5b7f4ce24787a92dfdd222505d8d678878794b1a Mon Sep 17 00:00:00 2001
From 704e15673a836f483aebe693559369b64b465b9a Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Thu, 4 Apr 2019 19:44:46 +1000
Date: Sat, 4 Jul 2020 13:56:09 +1000
Subject: Fixes for Haiku
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1d443e1..6ae2487 100644
index ee98014..5784bf7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -85,7 +85,7 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Android")
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()
@@ -124,7 +124,7 @@ option(USE_SYSTEM_FFMPEG "Dynamically link against system FFMPEG" ${USE_SYSTEM_F
option(USE_SYSTEM_LIBZIP "Dynamically link against system libzip" ${USE_SYSTEM_LIBZIP})
option(USE_ADDRESS_SANITIZER "Use Clang memory sanitizer" ${USE_ADDRESS_SANITIZER})
@@ -26,16 +17,16 @@ index 1d443e1..6ae2487 100644
if(USING_X11_VULKAN)
message("Using X11 for Vulkan")
add_definitions(-DVK_USE_PLATFORM_XLIB_KHR)
@@ -1787,7 +1787,7 @@ if(FFmpeg_FOUND)
@@ -1812,7 +1812,7 @@ if(FFmpeg_FOUND)
endif()
# Discord integration
-if(USE_DISCORD AND NOT IOS)
+if(USE_DISCORD AND NOT IOS AND NOT HAIKU)
-if(USE_DISCORD AND NOT IOS AND NOT LIBRETRO)
+if(USE_DISCORD AND NOT IOS AND NOT LIBRETRO AND NOT HAIKU)
add_definitions(-DUSE_DISCORD=1)
target_link_libraries(${CoreLibName} discord-rpc)
endif()
@@ -1906,6 +1906,10 @@ set(WindowsFiles
@@ -1932,6 +1932,10 @@ set(WindowsFiles
list(APPEND LinkCommon ${CoreLibName} ${CMAKE_THREAD_LIBS_INIT})
@@ -44,13 +35,26 @@ index 1d443e1..6ae2487 100644
+endif()
+
if(WIN32)
list(APPEND LinkCommon kernel32 user32 gdi32 shell32 comctl32 dsound xinput d3d9 winmm dinput8 ole32 winspool ksuser)
list(APPEND LinkCommon kernel32 user32 gdi32 shell32 comctl32 dsound xinput d3d9 winmm dinput8 ole32 winspool ksuser mf mfplat mfreadwrite mfuuid shlwapi)
#setup_target_project(${TargetBin} Windows)
diff --git a/Common/Swap.h b/Common/Swap.h
index 3a5d8ac..f68142f 100644
--- a/Common/Swap.h
+++ b/Common/Swap.h
@@ -68,6 +68,8 @@ inline unsigned short bswap16(unsigned short x) { return _byteswap_ushort(x); }
#elif defined(__DragonFly__) || defined(__FreeBSD__) || \
defined(__NetBSD__) || defined(__OpenBSD__)
#include <sys/endian.h>
+#elif defined(__HAIKU__)
+#include <endian.h>
# ifdef __OpenBSD__
#define bswap16 swap16
#define bswap32 swap32
diff --git a/Core/Config.cpp b/Core/Config.cpp
index f1805da..c35485a 100644
index 214aeb4..ea3db77 100644
--- a/Core/Config.cpp
+++ b/Core/Config.cpp
@@ -483,7 +483,7 @@ static int DefaultRenderingMode() {
@@ -518,7 +518,7 @@ static ConfigSetting cpuSettings[] = {
static int DefaultInternalResolution() {
// Auto on Windows, 2x on large screens, 1x elsewhere.
@@ -59,7 +63,7 @@ index f1805da..c35485a 100644
return 0;
#else
int longestDisplaySide = std::max(System_GetPropertyInt(SYSPROP_DISPLAY_XRES), System_GetPropertyInt(SYSPROP_DISPLAY_YRES));
@@ -612,7 +612,11 @@ static ConfigSetting graphicsSettings[] = {
@@ -728,7 +728,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),
@@ -71,7 +75,7 @@ index f1805da..c35485a 100644
ReportedConfigSetting("FrameSkipType", &g_Config.iFrameSkipType, 0, true, true),
ReportedConfigSetting("AutoFrameSkip", &g_Config.bAutoFrameSkip, false, true, true),
ConfigSetting("FrameRate", &g_Config.iFpsLimit1, 0, true, true),
@@ -623,10 +627,17 @@ static ConfigSetting graphicsSettings[] = {
@@ -739,10 +743,17 @@ static ConfigSetting graphicsSettings[] = {
#endif
// Most low-performance (and many high performance) mobile GPUs do not support aniso anyway so defaulting to 4 is fine.
@@ -90,7 +94,7 @@ index f1805da..c35485a 100644
ReportedConfigSetting("TextureSecondaryCache", &g_Config.bTextureSecondaryCache, false, true, true),
ReportedConfigSetting("VertexDecJit", &g_Config.bVertexDecoderJit, &DefaultCodeGen, false),
@@ -658,7 +669,11 @@ static ConfigSetting graphicsSettings[] = {
@@ -775,7 +786,11 @@ static ConfigSetting graphicsSettings[] = {
ReportedConfigSetting("PostShader", &g_Config.sPostShaderName, "Off", true, true),
ReportedConfigSetting("MemBlockTransferGPU", &g_Config.bBlockTransferGPU, true, true, true),
@@ -103,10 +107,10 @@ index f1805da..c35485a 100644
ConfigSetting("GfxDebugOutput", &g_Config.bGfxDebugOutput, false, false, false),
diff --git a/SDL/SDLMain.cpp b/SDL/SDLMain.cpp
index 7c4ae40..dd17922 100644
index a5928d4..e0267fe 100644
--- a/SDL/SDLMain.cpp
+++ b/SDL/SDLMain.cpp
@@ -131,7 +131,7 @@ void LaunchBrowser(const char *url) {
@@ -210,7 +210,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);
@@ -115,7 +119,7 @@ index 7c4ae40..dd17922 100644
std::string command = std::string("open ") + url;
system(command.c_str());
#else
@@ -149,7 +149,7 @@ void LaunchMarket(const char *url) {
@@ -233,7 +233,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);
@@ -124,7 +128,7 @@ index 7c4ae40..dd17922 100644
std::string command = std::string("open ") + url;
system(command.c_str());
#else
@@ -167,7 +167,7 @@ void LaunchEmail(const char *email_address) {
@@ -251,7 +251,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);
@@ -133,44 +137,37 @@ index 7c4ae40..dd17922 100644
std::string command = std::string("open mailto:") + email_address;
system(command.c_str());
#else
@@ -188,6 +188,8 @@ std::string System_GetProperty(SystemProperty prop) {
@@ -270,6 +270,8 @@ std::string System_GetProperty(SystemProperty prop) {
return "SDL:Windows";
#elif __linux__
return "SDL:Linux";
#elif __APPLE__
return "SDL:OSX";
+#elif __HAIKU__
+ return "SDL:Haiku";
#else
return "SDL:";
#endif
@@ -342,6 +344,23 @@ int main(int argc, char *argv[]) {
}
}
#elif __APPLE__
return "SDL:macOS";
#elif PPSSPP_PLATFORM(SWITCH)
@@ -465,6 +467,16 @@ int main(int argc, char *argv[]) {
nxlinkStdio();
#endif // HAVE_LIBNX
+#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);
+ char *binpath = realpath(argv[0], NULL);
+ if (binpath != NULL) {
+ char *appdir = strrchr(binpath, '/');
+ *appdir = '\0';
+ chdir(binpath);
+ free(binpath);
+ }
+ chdir(abs_exe_path);
+#endif
+
glslang::InitializeProcess();
#if PPSSPP_PLATFORM(RPI)
diff --git a/UI/NativeApp.cpp b/UI/NativeApp.cpp
index 38e9466..838b839 100644
index 4420a5a..04a9b7a 100644
--- a/UI/NativeApp.cpp
+++ b/UI/NativeApp.cpp
@@ -475,6 +475,9 @@ void NativeInit(int argc, const char *argv[], const char *savegame_dir, const ch
@@ -505,6 +505,9 @@ void NativeInit(int argc, const char *argv[], const char *savegame_dir, const ch
g_Config.memStickDirectory = memstickDir + "/";
}
}
@@ -180,51 +177,6 @@ index 38e9466..838b839 100644
#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 b259a6f..601ac45 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(USE_DISCORD AND NOT IOS)
+if(USE_DISCORD AND NOT IOS AND NOT HAIKU)
add_subdirectory(discord-rpc-build)
endif()
--
2.23.0
From 57b7dbc1602a8a615e19146e4486efc72a642c1e Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Thu, 5 Sep 2019 22:00:26 +1000
Subject: Fix for endian
diff --git a/Common/Swap.h b/Common/Swap.h
index 3a5d8ac..f68142f 100644
--- a/Common/Swap.h
+++ b/Common/Swap.h
@@ -68,6 +68,8 @@ inline unsigned short bswap16(unsigned short x) { return _byteswap_ushort(x); }
#elif defined(__DragonFly__) || defined(__FreeBSD__) || \
defined(__NetBSD__) || defined(__OpenBSD__)
#include <sys/endian.h>
+#elif defined(__HAIKU__)
+#include <endian.h>
# ifdef __OpenBSD__
#define bswap16 swap16
#define bswap32 swap32
--
2.23.0
From c7242d75b966ecdb7d918c601d50caa8e6637ed9 Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Thu, 5 Sep 2019 22:00:41 +1000
Subject: Fix for ffmpeg 4.2
diff --git a/cmake/Modules/FindFFmpeg.cmake b/cmake/Modules/FindFFmpeg.cmake
index a8c482d..a1b76e1 100644
--- a/cmake/Modules/FindFFmpeg.cmake
@@ -245,58 +197,18 @@ index a8c482d..a1b76e1 100644
set(_FFmpeg_DEPS_swresample avutil)
set(_FFmpeg_DEPS_swscale avutil)
--
2.23.0
From 275a5e462da4df6a48da133f704d3d8ee5255adb Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Thu, 5 Sep 2019 22:48:49 +1000
Subject: Resolve symlink
diff --git a/SDL/SDLMain.cpp b/SDL/SDLMain.cpp
index dd17922..19b8d51 100644
--- a/SDL/SDLMain.cpp
+++ b/SDL/SDLMain.cpp
@@ -345,20 +345,13 @@ 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);
+ char *binpath = realpath(argv[0], NULL);
+ if (binpath != NULL) {
+ char *appdir = strrchr(binpath, '/');
+ *appdir = '\0';
+ chdir(binpath);
+ free(binpath);
+ }
#endif
glslang::InitializeProcess();
--
2.23.0
From c8f32373f5cba6d2da7726fbbdbe39c7fadd4060 Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Mon, 16 Sep 2019 22:48:18 +1000
Subject: Use SupportDefs.h
diff --git a/ext/CMakeLists.txt b/ext/CMakeLists.txt
index 16b4adb..92c723d 100644
--- a/ext/CMakeLists.txt
+++ b/ext/CMakeLists.txt
@@ -17,6 +17,6 @@ add_subdirectory(glslang EXCLUDE_FROM_ALL)
add_subdirectory(snappy)
add_subdirectory(udis86)
add_subdirectory(SPIRV-Cross-build)
-if(USE_DISCORD AND NOT IOS AND NOT LIBRETRO)
+if(USE_DISCORD AND NOT IOS AND NOT LIBRETRO AND NOT HAIKU)
add_subdirectory(discord-rpc-build)
endif()
diff --git a/ext/native/ext/cityhash/city.h b/ext/native/ext/cityhash/city.h
index 94499ce..e5249cc 100644
--- a/ext/native/ext/cityhash/city.h
@@ -316,5 +228,5 @@ index 94499ce..e5249cc 100644
inline uint64 Uint128Low64(const uint128& x) { return x.first; }
--
2.23.0
2.27.0

View File

@@ -3,11 +3,11 @@ DESCRIPTION="PPSSPP is a PSP (PlayStation Portable) emulator capable of playing
majority of the games made for Sonys first portable console right on your favorite \
Android or PC device."
HOMEPAGE="https://www.ppsspp.org/"
COPYRIGHT="2012-2019 PPSSPP Project"
COPYRIGHT="2012-2020 PPSSPP Project"
LICENSE="GNU GPL v2"
REVISION="1"
SOURCE_URI="https://github.com/hrydgard/ppsspp/archive/v$portVersion.tar.gz"
CHECKSUM_SHA256="d225096582e682921f6535aa486c737c7b9e94102d5bf5a45cc2763425846493"
CHECKSUM_SHA256="e94f24116e70c0452081370d1ea00e4018040cf04b3f1a6f44575e1be81ed66e"
SOURCE_FILENAME="ppsspp-$portVersion.tar.gz"
SOURCE_DIR="ppsspp-$portVersion"
srcGitRev_2="7885552b208493a6a0f21663770c446c3ba65576"
@@ -15,9 +15,9 @@ SOURCE_URI_2="https://github.com/Kingcom/armips/archive/$srcGitRev_2.tar.gz"
CHECKSUM_SHA256_2="f8a03906135fb6f2932b80b7ef5991f39ccac46b36ec3690776fb38c69775c3d"
SOURCE_FILENAME_2="armips-$srcGitRev_2.tar.gz"
SOURCE_DIR_2="armips-$srcGitRev_2"
srcGitRev_3="f9d08a25fbe17e0677a89d398f4d7f232339c3f9"
srcGitRev_3="d0850f875ec392a130ccf00018dab458b546f27c"
SOURCE_URI_3="https://github.com/hrydgard/glslang/archive/$srcGitRev_3.tar.gz"
CHECKSUM_SHA256_3="1e4284387cc586acb7ce0eefba712fe15e11a87c45c102063c11d0fa60f66dce"
CHECKSUM_SHA256_3="699e177e0022f17c204e3542bbf7fcb6843923095968edc1ebbc5124e85a2bdf"
SOURCE_FILENAME_3="glslang-$srcGitRev_3.tar.gz"
SOURCE_DIR_3="glslang-$srcGitRev_3"
srcGitRev_4="a1f7c8dc8ea2f94443951ee27003bffa562c1f13"
@@ -25,9 +25,9 @@ SOURCE_URI_4="https://github.com/KhronosGroup/SPIRV-Cross/archive/$srcGitRev_4.t
CHECKSUM_SHA256_4="456b1e2a75a8e82985ce22f4707570c7aa1fc50d4119cba1a641e8b233ecde26"
SOURCE_FILENAME_4="SPIRV-Cross-$srcGitRev_4.tar.gz"
SOURCE_DIR_4="SPIRV-Cross-$srcGitRev_4"
srcGitRev_5="bfc3a511f60e84de4d49170e2c442ac36b09cdfd"
srcGitRev_5="942934a3d55f600622fb3f3ad60ecc1f3da23b6b"
SOURCE_URI_5="https://github.com/hrydgard/ppsspp-lang/archive/$srcGitRev_5.tar.gz"
CHECKSUM_SHA256_5="c0cc57b54aa376a9dca6de9c6b162a613d54111f7a8587fcfc243e836568ac0c"
CHECKSUM_SHA256_5="4327760e8c2c34bb335de52b74a0b7501d9e441766ec5c7c6702dadf3362ab13"
SOURCE_FILENAME_5="ppsspp-lang-$srcGitRev_5.tar.gz"
SOURCE_DIR_5="ppsspp-lang-$srcGitRev_5"
PATCHES="ppsspp-$portVersion.patchset"