From 94bfe6a5bdc5c340d79a03f4e11821ab916eb715 Mon Sep 17 00:00:00 2001
From: samy-k97 <66317077+samy-k97@users.noreply.github.com>
Date: Tue, 15 Jun 2021 13:18:58 +0100
Subject: [PATCH] A few corrections were made Libzip updated to 1.7.3 "cleanup"
 to remove "PPSSPPSDL.desktop" Bug tracker link was added Changelog was added
 removed rename-desktop-file rename-icon and rename-appdata-file added
 ${FLATPAK_DEST} and ${FLATPAK_ID}

---
 appdata.xml            | 81 ++++++++++++++++++++++++++++++++++++++----
 org.ppsspp.PPSSPP.json | 18 +++++-----
 2 files changed, 83 insertions(+), 16 deletions(-)

diff --git a/appdata.xml b/appdata.xml
index 7f7f6c9..f60199c 100644
--- a/appdata.xml
+++ b/appdata.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<application>
-  <id type="desktop">ppsspp.desktop</id>
+<component type="desktop">
+  <id>org.ppsspp.PPSSPP</id>
   <name>PPSSPP</name>
   <summary>A PlayStation Portable emulator</summary>
   <metadata_license>CC0-1.0</metadata_license>
@@ -13,6 +13,7 @@
     </p>
   </description>
   <url type="homepage">http://www.ppsspp.org/</url>
+  <url type="bugtracker">https://github.com/hrydgard/ppsspp/issues</url>
   <screenshots>
     <screenshot type="default">https://raw.githubusercontent.com/flathub/org.ppsspp.PPSSPP/master/screenshots/1.png</screenshot>
     <screenshot>https://raw.githubusercontent.com/flathub/org.ppsspp.PPSSPP/master/screenshots/2.png</screenshot>
@@ -20,9 +21,74 @@
     <screenshot>https://raw.githubusercontent.com/flathub/org.ppsspp.PPSSPP/master/screenshots/4.png</screenshot>
   </screenshots>
   <releases>
-    <release version="1.11.3" date="2021-06-10"/>
+    <release version="1.11.3" date="2021-06-10">
+      <description>
+        <p>What's new in 1.11.3:</p>
+        <ul>
+          <li>Fix for graphics glitches in the on-screen keyboard</li>
+        </ul>
+      </description>
+    </release>
+    <release version="1.11.2" date="2021-02-14">
+      <description>
+        <p>What's new in 1.11.2:</p>
+        <ul>
+          <li>An additional few crash fixes(#14129, #14134, #14132)</li>
+        </ul>
+      </description>
+    </release>
+    <release version="1.11.1" date="2021-02-11">
+      <description>
+        <p>What's new in 1.11.1:</p>
+        <ul>
+          <li>A few crash fixes (#14085, #14089, #14091, #14092), a few adhoc fixes</li>
+          <li>Glitchy menu audio on some devices (#14101), in-game UI font memory leak (#14078)</li>
+          <li>Couple of adhoc fixes (#14106, #14117)</li>
+        </ul>
+      </description>
+    </release>
+    <release version="1.11.0" date="2021-02-07">
+      <description>
+        <p>What's new in 1.11.0:</p>
+        <ul>
+          <li>Lots of minor bug fixes, crash fixes, and performance fixes and improvements.</li>
+          <li>New Browse... button to allow opening SD cards on Android 11</li>
+          <li>Countless AdHoc networking fixes by ANR2ME, for example Dragon Ball Shin Budokai, PowerStone, Bleach Heat The Soul 7, Kingdom Hearts, GTA: VCS and many more.</li>
+          <li>Graphics issue with car reflections fixed in Outrun, Dirt 2 (#13636, #13640, #13760)</li>
+          <li>Cut-off cards in Yu Gi Oh fixed (#7124).</li>
+          <li>Numerous fixes to the builtin fonts by nassau-tk</li>
+          <li>Added exception handler so PPSSPP stays alive if a game crashes (#11795/#13092)</li>
+          <li>Desktop: Support for multiple instance multiplayer (#13172, ...)</li>
+          <li>Workaround for rendering bugs with flat shading in iOS 14</li>
+          <li>Multiple fixes to the IR interpreter (#13897, ...)</li>
+          <li>UI: New fullscreen button on desktop platforms, optional navigation sounds (#13239)</li>
+          <li>Audio and multiple hangs fixes in UWP version (#13792, ...)</li>
+          <li>Partial microphone support (#12336, ...)</li>
+          <li>Workaround for wacky action mirroring bug in Hitman Reborn Battle Arena 2 (#13706, #13526)</li>
+          <li>Hardware texture upscaling for Vulkan, mipmap generation (#13235, #13514)</li>
+          <li>Added MMPX Vulkan texture upscaling shader (#13986)</li>
+          <li>Depth texturing support in Vulkan and D3D11 (#13262, #13556, ...)</li>
+          <li>Performance fix for Test Drive Unlimited (#13355, ...)</li>
+          <li>Allow rewind on mobile (#13866)</li>
+          <li>Added option to disable on-screen messages (#13695)</li>
+          <li>Added "Lower resolution for effects" on libretro (#13654)</li>
+          <li>Allow chaining multiple post-processing shaders (#12924)</li>
+          <li>Support for loading game-specific plugins (#13335)</li>
+          <li>Fixed Assassin's Creed: Bloodlines Save issue on Android (#12761)</li>
+          <li>Hanayaka Nari Wa ga Ichizoku: mono voices fixed (#5213)</li>
+          <li>Additional fixed games:</li>
+          <li>Namco Museum - Battle Collection, Vol 2 ([#9523], [#13297], [#13298])</li>
+          <li>Dream Club Portable (graphics bugs, GL and Vulkan) ([#6025])</li>
+          <li>Xyanide Resurrection (freezing) ([#8526])</li>
+          <li>Dissidia Final Fantasy Chinese (patched game, invalid address) ([#13204])</li>
+          <li>Crazy Taxi ([#13368])</li>
+          <li>Spiderman: Friend or Foe ([#13969])</li>
+          <li>Downstream Panic (US) (New Game crash) ([#13633])</li>
+        </ul>
+      </description>
+    </release>
     <release version="1.10.0" date="2020-06-27"/>
-    <release version="1.9.4" date="2019-10-17"/>
+    <release version="1.9.4" date="2019-10-16"/>
     <release version="1.8.0" date="2019-03-14"/>
     <release version="1.7.5" date="2018-12-05"/>
     <release version="1.7.2" date="2018-11-03"/>
@@ -30,11 +96,12 @@
     <release version="1.6.3" date="2018-06-05"/>
     <release version="1.6.1" date="2018-05-30">
       <description>
-        <p>Fix various crashes</p>
+        <p>Fix various crashes.</p>
       </description>
     </release>
     <release version="1.6" date="2018-05-26">
       <description>
+        <p>What's new in 1.6</p>
         <ul>
           <li>OpenGL backend now properly multithreaded, giving a good speed boost.</li>
           <li>Various Vulkan performance improvements and memory allocation fixes.</li>
@@ -70,5 +137,5 @@
     </release>
   </releases>
   <content_rating type="oars-1.1" />
-  <updatecontact>b@bpiotrowski.pl</updatecontact>
-</application>
+  <update_contact>b@bpiotrowski.pl</update_contact>
+</component>
diff --git a/org.ppsspp.PPSSPP.json b/org.ppsspp.PPSSPP.json
index 904106a..c790145 100644
--- a/org.ppsspp.PPSSPP.json
+++ b/org.ppsspp.PPSSPP.json
@@ -5,9 +5,6 @@
   "runtime-version": "20.08",
   "sdk": "org.freedesktop.Sdk",
   "command": "ppsspp",
-  "rename-desktop-file": "ppsspp.desktop",
-  "rename-icon": "ppsspp",
-  "rename-appdata-file": "ppsspp.appdata.xml",
   "finish-args": [
     "--device=all",
     "--filesystem=host:ro",
@@ -31,8 +28,8 @@
       "sources": [
         {
           "type": "archive",
-          "url": "https://libzip.org/download/libzip-1.7.1.tar.xz",
-          "sha256": "a020dc1b17a79faa748e43a05f8605d65e403813e8e97ad3a300a90ddba097ac"
+          "url": "https://libzip.org/download/libzip-1.7.3.tar.xz",
+          "sha256": "a60473ffdb7b4260c08bfa19c2ccea0438edac11193c3afbbb1f17fbcf6c6132"
         }
       ]
     },
@@ -46,14 +43,17 @@
           }
         }
       },
+      "cleanup": [
+        "/share/applications/"
+      ],
       "build-commands": [
         "cd ffmpeg && ../ffmpeg-build.sh",
         "cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=${FLATPAK_DEST} ${EXTRA_OPTS} .",
         "make -j${FLATPAK_BUILDER_N_JOBS} && make install",
-        "ln -s /app/bin/PPSSPPSDL /app/bin/ppsspp",
-        "install -Dm644 icons/icon-512.svg /app/share/icons/hicolor/scalable/apps/ppsspp.svg",
-        "install -m644 ppsspp.desktop /app/share/applications/",
-        "install -Dm644 appdata.xml /app/share/appdata/ppsspp.appdata.xml"
+        "ln -s ${FLATPAK_DEST}/bin/PPSSPPSDL ${FLATPAK_DEST}/bin/ppsspp",
+        "install -Dm644 icons/icon-512.svg ${FLATPAK_DEST}/share/icons/hicolor/scalable/apps/${FLATPAK_ID}.svg",
+        "install -Dm644 ppsspp.desktop ${FLATPAK_DEST}/share/applications/${FLATPAK_ID}.desktop",
+        "install -Dm644 appdata.xml ${FLATPAK_DEST}/share/appdata/${FLATPAK_ID}.appdata.xml"
       ],
       "sources": [
         {