Primehack additions

This commit is contained in:
icenine451 2022-11-21 11:46:24 -05:00
parent 9558c69b34
commit 5efb4e3e4a
4 changed files with 77 additions and 3 deletions

View file

@ -841,12 +841,12 @@ modules:
# in non-writable paths, typically happens when a user
# has leftover files from a previous non-flatpak install
- type: patch
path: rd-submodules/dolphin/detectflatpak.patch
path: rd-submodules/primehack/detectflatpak.patch
# version strings must match exactly for online multiplayer
- type: patch
path: rd-submodules/dolphin/nodirtyversion.patch
path: rd-submodules/primehack/nodirtyversion.patch
- type: file
path: appdata.xml
path: rd-submodules/primehack/appdata.xml
- type: script
commands:
- for i in {0..9}; do

View file

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<application>
<id type="desktop">io.github.shiiion.primehack</id>
<name>PrimeHack</name>
<summary>Dolphin Emu fork for various Metroid Prime mods</summary>
<developer_name>Shiiion, SirMangler</developer_name>
<metadata_license>CC0-1.0</metadata_license>
<project_license>GPL-2.0+</project_license>
<content_rating type="oars-1.0" />
<description><p>PrimeHack is a fork of Dolphin Emulator to bring modern Mouse and Keyboard controls, as well as Dual-Stick gamepad controls to the Metroid Prime Trilogy. PrimeHack also offers many other features such as increased FoV and various new cheats.</p></description>
<screenshots>
<screenshot type="default">https://raw.githubusercontent.com/flathub/io.github.shiiion.primehack/master/screenshots/1.png</screenshot>
<screenshot>https://raw.githubusercontent.com/flathub/io.github.shiiion.primehack/master/screenshots/2.png</screenshot>
<screenshot>https://raw.githubusercontent.com/flathub/io.github.shiiion.primehack/master/screenshots/3.png</screenshot>
</screenshots>
<provides>
<binary>dolphin-emu</binary>
<id>io.github.shiiion.primehack.desktop</id>
</provides>
<releases>
<release date="2022-10-02" version="1.0.6a"/>
</releases>
<url type="homepage">https://github.com/shiiion/dolphin</url>
<url type="help">https://github.com/shiiion/dolphin/wiki</url>
<url type="faq">https://github.com/shiiion/dolphin/wiki/Frequently-Asked-Questions</url>
<url type="bugtracker">https://github.com/shiiion/dolphin/issues</url>
</application>

View file

@ -0,0 +1,34 @@
From f2d3b349d8487cf0ee50b36ba024ac513d36f826 Mon Sep 17 00:00:00 2001
From: Carles Pastor <cpbadosa@gmail.com>
Date: Sat, 20 Aug 2022 13:35:32 +0200
Subject: [PATCH] Detect we are running inside a flatpak sandbox
---
Source/Core/UICommon/UICommon.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Source/Core/UICommon/UICommon.cpp b/Source/Core/UICommon/UICommon.cpp
index 8d9dc2abb8..8a9d39a3d5 100644
--- a/Source/Core/UICommon/UICommon.cpp
+++ b/Source/Core/UICommon/UICommon.cpp
@@ -348,7 +348,7 @@ void SetUserDirectory(std::string custom_path)
// -> Use GetExeDirectory()/User
// 2. $DOLPHIN_EMU_USERPATH is set
// -> Use $DOLPHIN_EMU_USERPATH
- // 3. ~/.dolphin-emu directory exists
+ // 3. ~/.dolphin-emu directory exists, and we're not in flatpak
// -> Use ~/.dolphin-emu
// 4. Default
// -> Use XDG basedir, see
@@ -381,7 +381,7 @@ void SetUserDirectory(std::string custom_path)
{
user_path = home_path + "." DOLPHIN_DATA_DIR DIR_SEP;
- if (!File::Exists(user_path))
+ if (File::Exists("/.flatpak-info") || !File::Exists(user_path))
{
const char* data_home = getenv("XDG_DATA_HOME");
std::string data_path =
--
2.37.1

View file

@ -0,0 +1,13 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9af66009a1..2acd3bed9a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -149,7 +149,7 @@ if(GIT_FOUND)
OUTPUT_VARIABLE DOLPHIN_WC_REVISION
OUTPUT_STRIP_TRAILING_WHITESPACE)
# defines DOLPHIN_WC_DESCRIBE
- execute_process(WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} COMMAND ${GIT_EXECUTABLE} describe --always --long --dirty
+ execute_process(WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} COMMAND ${GIT_EXECUTABLE} describe --always --long
OUTPUT_VARIABLE DOLPHIN_WC_DESCRIBE
OUTPUT_STRIP_TRAILING_WHITESPACE)