From dc30c2a53d33df30335b55552f030b65b549fe1c Mon Sep 17 00:00:00 2001
From: XargonWan <XargonWan@gmail.com>
Date: Sat, 28 Dec 2024 00:16:11 +0900
Subject: [PATCH] PORTMASTER: added to Zenity

---
 tools/configurator.sh | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/tools/configurator.sh b/tools/configurator.sh
index a29f8499..8fecf5d5 100755
--- a/tools/configurator.sh
+++ b/tools/configurator.sh
@@ -34,6 +34,7 @@ source /app/libexec/global.sh
 #       - MelonDS
 #       - PCSX2
 #       - PPSSPP
+#       - PortMaster
 #       - Primehack
 #       - Ruffle
 #       - RPCS3
@@ -83,6 +84,7 @@ source /app/libexec/global.sh
 #           - Reset MelonDS
 #           - Reset PCSX2
 #           - Reset PPSSPP
+#           - Reset PortMaster
 #           - Reset Primehack
 #           - Reset Ruffle
 #           - Reset RPCS3
@@ -448,6 +450,7 @@ configurator_open_emulator_dialog() {
     "MelonDS" "Open the NDS emulator MelonDS"
     "PCSX2" "Open the PS2 emulator PSXC2"
     "PPSSPP" "Open the PSP emulator PPSSPP"
+    "PortMaster" "Open PortMaster to manage your ports, even available from games list under PortMaster system"
     "Primehack" "Open the Metroid Prime emulator Primehack"
     "Ruffle" "Open the Flash emulator Ruffle"
     "RPCS3" "Open the PS3 emulator RPCS3"
@@ -520,6 +523,11 @@ configurator_open_emulator_dialog() {
     PPSSPPSDL
   ;;
 
+  "PortMaster" )
+    log i "Configurator: \"$emulator\""
+    PortMaster
+  ;;
+
   "Primehack" )
     log i "Configurator: \"$emulator\""
     primehack-wrapper
@@ -1104,6 +1112,7 @@ configurator_reset_dialog() {
     "MelonDS" "Reset the NDS emulator MelonDS to default settings"
     "PCSX2" "Reset the PS2 emulator PCSX2 to default settings"
     "PPSSPP" "Reset the PSP emulator PPSSPP to default settings"
+    "PortMaster" "Reset PortMaster to default settings"
     "Primehack" "Reset the Metroid Prime emulator Primehack to default settings"
     "RPCS3" "Reset the PS3 emulator RPCS3 to default settings"
     "Ryujinx" "Reset the Switch emulator Ryujinx to default settings"
@@ -1148,7 +1157,7 @@ configurator_reset_dialog() {
       fi
     ;;
 
-    "Cemu" | "Citra" | "Dolphin" | "Duckstation" | "GZDoom" | "Yuzu" | "MelonDS" | "MAME" | "PCSX2" | "PPSSPP" | "Primehack" | "Ruffle" | "RPCS3" | "Ryujinx" | "SteamROMManager" )
+    "Cemu" | "Citra" | "Dolphin" | "Duckstation" | "GZDoom" | "Yuzu" | "MelonDS" | "MAME" | "PCSX2" | "PPSSPP" | "PortMaster" | "Primehack" | "Ruffle" | "RPCS3" | "Ryujinx" | "SteamROMManager" )
       if [[ $(configurator_reset_confirmation_dialog "$component_to_reset" "Are you sure you want to reset the $component_to_reset emulator to default settings?\n\nThis process cannot be undone.") == "true" ]]; then
         prepare_component "reset" "$component_to_reset" "configurator"
         configurator_process_complete_dialog "resetting $component_to_reset"