mirror of
https://github.com/RetroDECK/RetroDECK.git
synced 2024-11-22 05:55:38 +00:00
RUN_GAME: working but looping - fix
This commit is contained in:
parent
38806dabc1
commit
d0644c82e6
|
@ -984,6 +984,7 @@ run_game() {
|
|||
# Function to handle the %INJECT% placeholder
|
||||
handle_inject_placeholder() {
|
||||
local cmd="$1"
|
||||
local rom_dir=$(dirname "$game") # Define rom_dir based on the game path
|
||||
|
||||
# Find all occurrences of %INJECT%=something
|
||||
while [[ "$cmd" =~ %INJECT%=(.*) ]]; do
|
||||
|
@ -994,7 +995,7 @@ run_game() {
|
|||
|
||||
log d "Found %INJECT% pointing to file \"$inject_file_full_path\""
|
||||
|
||||
# Check if the file exists
|
||||
# Check if the file exists (no escaping needed, just quotes)
|
||||
if [[ -f "$inject_file_full_path" ]]; then
|
||||
# Read the content of the file
|
||||
inject_content=$(cat "$inject_file_full_path")
|
||||
|
@ -1013,6 +1014,10 @@ run_game() {
|
|||
echo "$cmd"
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# Function to replace %EMULATOR_SOMETHING% with the actual path of the emulator
|
||||
replace_emulator_placeholder() {
|
||||
local placeholder=$1
|
||||
|
|
Loading…
Reference in a new issue