mgba, bump version (#5877)

This commit is contained in:
Schrijvers Luc
2021-05-08 09:45:29 +02:00
committed by GitHub
parent b1c04403e2
commit 01c9c01a84
2 changed files with 11 additions and 45 deletions

View File

@@ -10,12 +10,11 @@ Other goals include accurate enough emulation to provide a development \
environment for homebrew software, a good workflow for tool-assist runners, \
and a modern feature set for emulators that older emulators may not support."
HOMEPAGE="https://mgba.io/"
COPYRIGHT="2013-2020 Jeffrey Pfau"
COPYRIGHT="2013-2021 Jeffrey Pfau"
LICENSE="MPL v2.0"
REVISION="1"
SOURCE_URI="https://github.com/mgba-emu/mgba/archive/$portVersion.tar.gz"
CHECKSUM_SHA256="6b94873dac9040fd6fd9f13f76dc48f342e954f3b4cf82717b59601c3a32b72c"
PATCHES="mgba-$portVersion.patch"
CHECKSUM_SHA256="c1e5f6c7635dfb015f8c9466638dd55ee7747cdfb0ca69017baf15ec19d727f9"
ADDITIONAL_FILES="mgba.rdef.in"
ARCHITECTURES="!x86_gcc2 x86 x86_64"
@@ -33,6 +32,8 @@ REQUIRES="
lib:libavformat$secondaryArchSuffix
lib:libavutil$secondaryArchSuffix
lib:libedit$secondaryArchSuffix
lib:liblzma$secondaryArchSuffix
lib:libminizip$secondaryArchSuffix
lib:libncurses$secondaryArchSuffix
lib:libpng16$secondaryArchSuffix
lib:libQt5Core$secondaryArchSuffix
@@ -46,6 +47,7 @@ REQUIRES="
# BApplication objects independent of the other.
# SDL1.2 checks if one already exists first, so it's OK.
lib:libSDL_1.2$secondaryArchSuffix
lib:libsqlite3$secondaryArchSuffix
lib:libswscale$secondaryArchSuffix
lib:libz$secondaryArchSuffix
lib:libzip$secondaryArchSuffix
@@ -57,6 +59,8 @@ BUILD_REQUIRES="
devel:libavformat$secondaryArchSuffix
devel:libavutil$secondaryArchSuffix
devel:libedit$secondaryArchSuffix
devel:liblzma$secondaryArchSuffix
devel:libminizip$secondaryArchSuffix
devel:libncurses$secondaryArchSuffix
devel:libpng16$secondaryArchSuffix
devel:libQt5Core$secondaryArchSuffix
@@ -65,6 +69,7 @@ BUILD_REQUIRES="
devel:libQt5Network$secondaryArchSuffix
devel:libQt5Widgets$secondaryArchSuffix
devel:libSDL_1.2$secondaryArchSuffix
devel:libsqlite3$secondaryArchSuffix
devel:libswscale$secondaryArchSuffix
devel:libz$secondaryArchSuffix
devel:libzip$secondaryArchSuffix
@@ -106,6 +111,9 @@ INSTALL()
-e "s|@LONG_INFO@|$LONG_INFO|" \
$portDir/additional-files/mgba.rdef.in > mgba.rdef
# not needed
rm -rf $prefix/share
addResourcesToBinaries mgba.rdef $binDir/mgba-qt
addAppDeskbarSymlink $binDir/mgba-qt mGBA
}

View File

@@ -1,42 +0,0 @@
diff --git a/src/core/config.c b/src/core/config.c
index cd173dfb..9135e0fc 100644
--- a/src/core/config.c
+++ b/src/core/config.c
@@ -27,6 +27,10 @@
#include <mgba-util/platform/3ds/3ds-vfs.h>
#endif
+#ifdef __HAIKU__
+#include <FindDirectory.h>
+#endif
+
#define SECTION_NAME_MAX 128
struct mCoreConfigEnumerateData {
@@ -227,6 +231,12 @@ void mCoreConfigDirectory(char* out, size_t outLength) {
UNUSED(portable);
snprintf(out, outLength, "/%s", projectName);
FSUSER_CreateDirectory(sdmcArchive, fsMakePath(PATH_ASCII, out), 0);
+#elif defined(__HAIKU__)
+ UNUSED(portable);
+ char path[B_PATH_NAME_LENGTH];
+ find_directory(B_USER_SETTINGS_DIRECTORY, 0, false, path, B_PATH_NAME_LENGTH);
+ snprintf(out, outLength, "%s/%s", path, binaryName);
+ mkdir(out, 0755);
#else
getcwd(out, outLength);
strncat(out, PATH_SEP "portable.ini", outLength - strlen(out));
diff --git a/src/platform/qt/InputController.cpp b/src/platform/qt/InputController.cpp
index c6a598ce..f19130dd 100644
--- a/src/platform/qt/InputController.cpp
+++ b/src/platform/qt/InputController.cpp
@@ -272,8 +272,8 @@ void InputController::setPreferredGamepad(uint32_t type, int index) {
return;
}
#ifdef BUILD_SDL
- char name[34] = {0};
#if SDL_VERSION_ATLEAST(2, 0, 0)
+ char name[34] = {0};
SDL_JoystickGetGUIDString(SDL_JoystickGetGUID(SDL_JoystickListGetPointer(&s_sdlEvents.joysticks, index)->joystick), name, sizeof(name));
#else
const char* name = SDL_JoystickName(SDL_JoystickIndex(SDL_JoystickListGetPointer(&s_sdlEvents.joysticks, index)->joystick));