From a4ccd591dea9786c8acae0176724c4a01fa121da Mon Sep 17 00:00:00 2001 From: XargonWan Date: Wed, 18 Dec 2024 10:06:50 +0900 Subject: [PATCH] FRAMEWORK: removing the start argument in favour of running a game directly by passing the game to retrodeck.sh directly. --- net.retrodeck.retrodeck.appdata.xml | 2 +- retrodeck.sh | 23 ++++++++++++----------- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/net.retrodeck.retrodeck.appdata.xml b/net.retrodeck.retrodeck.appdata.xml index 7a641f58..727fe2fc 100644 --- a/net.retrodeck.retrodeck.appdata.xml +++ b/net.retrodeck.retrodeck.appdata.xml @@ -82,7 +82,7 @@
  • Because of this, Favorites collection is now enabled by default on ES-DE
  • New Configurator completely written in GODOT, now with controller support and many more features for you to discover
  • Cli entry --configurator now opens the new Configurator, while --legacy-configurator opens the old, zenity, one
  • -
  • New run game engine added to run games via cli, just run `flatpak run net.retrodeck.retrodeck start retrodeck/roms/system/game.ext`, `--help` for more info
  • +
  • New run game engine added to run games via cli, just run `flatpak run net.retrodeck.retrodeck retrodeck/roms/system/game.ext`, `--help` for more info
  • MIME Type added: this means that you can "open with" or double click your games and run them via RetroDECK thanks to the engine descripted above
  • ES-DE Updated to 3.1.1 with language support and more
  • ES-DE main menu tide up, because of our configurator there were too many entries, moved ES-DE specific configs inside a custom menu
  • diff --git a/retrodeck.sh b/retrodeck.sh index 7455e461..7d39d9d9 100644 --- a/retrodeck.sh +++ b/retrodeck.sh @@ -34,11 +34,12 @@ Arguments: --reset-component \t Reset one or more component or emulator configs to the default values --reset-retrodeck \t Starts the initial RetroDECK installer (backup your data first!) - start [-e emulator] [-s system] [-m] \t Start a game from cli using the default emulator or\n\t\t\t\t\t\t\t the one defined in ES-DE for game or system - \t start arguments: +Game Launch: + [] \t Start a game using the default emulator or\n\t\t\t\t\t\t the one defined in ES-DE for game or system + \t Options: \t \t-e (emulator)\t Run the game with the defined emulator (optional) \t \t-s (system)\t Force the game running with the defined system, for example running a gb game on gba (optional) - \t \t-m (manual)\t Manual mode: show the list of available emulator to chose from (optional) + \t \t-m (manual)\t Manual mode: show the list of available emulator to choose from (optional) For flatpak run specific options please run: flatpak run -h @@ -50,11 +51,6 @@ https://retrodeck.net echo "RetroDECK v$version" exit ;; - start*) - shift # Remove "start" - run_game "$@" - exit - ;; --info-msg*) echo "RetroDECK v$version" echo "RetroDECK config file is in: $rd_conf" @@ -126,9 +122,14 @@ https://retrodeck.net exit 1 ;; *) - validate_input "$i" - if [[ ! $input_validated == "true" ]]; then - echo "Please specify a valid option. Use -h for more information." + # Assume unknown arguments are game start arguments + if [ -f "$i" ]; then + echo "Attempting to start the game: $i" + run_game "$@" + exit + else + echo "Command or File '$i' not found. Ignoring argument and continuing..." + break # Continue with the main program fi ;; esac