-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
runcommand.sh: do not replace %ROM% tokens when empty #3550
Comments
I think you're calling the RetroPie-Setup/scriptmodules/helpers.sh Lines 1399 to 1414 in b0759ff
Withouth supplying the parameter, the
hence the empty '%ROM%'. |
The rom parameter is clearly optional:
The issue isn't in how the Did you see #3551? It addresses the problem correctly. That said, I don't see why Either way, this is clearly a bug. Know of any game binaries that explicitly require an empty place-holder parameter? I don't. |
Yes, but if your emulator command references it, it must be set, otherwise you'd get an empty parameter when you start
It's part of the issue -
|
My PR fixes the bug in your code in an elegant way, enabling users to forgo the rom parameter, and allowing the emulator binary to start a default ROM rather than define it explicitly. The small code change is opening MORE possibilities for users whose emulator or game has a default rather than restricting users unnecessarily. I don't frankly see any value in throwing errors about when there is a reasonable case for not providing a parameter like here. |
If you don't need the
How exactly is this opening 'more' posibilities ? Not sure what 'restriction' you're referring to. |
On the contrary. It is needed in this case.
The possibility to forgo specifying the rom parameter for any game/emulator that actually treats a rom parameter as optional and allows for two modes of operation:
So far so good? As it stands, the rom parameter in the current And since rom is optional, an emulator/game may run without one just as well. My fix enables that possibility for many games that allow specifying an optional level or a mode of operation via a parameter, i.e. %ROM$ in your RetroPie parlance as well as run fine without one. |
This is already possible - almost all |
What isn't possible is having %ROM% to enable the use of an optional (just in case this word isn't clear enough: optional - one that may be specified but isn't required) rom path. My fix enables a possibility of having no parameter supplied as Current state:
I hope it's clear what the intent is here for games run with or without a parameter from a single ports script. |
@twojstaryzdomu would this work?
Note the different 1st args making two separate "emulator" commands, and the first one doesn't use a |
@s1eve-mcdichae1 it did occur to me to try it but it doesn't work, you'd be duplicating functions. Each port requires its own install/build/configure etc. functions. Why have two ports when you can have one with one set of control functiions? That is far easier to maintain. Accepts a parameter if you supply it and ignores one if you don't. Simple. My solution serves to avoid many other problems. It doesn't break any existing port that I know of. Why the PR hasn't been accepted I can only speculate. Maintainers here are clearly reluctant to accept contributions to the core scripts. |
%ROM%
appears to be quoted for no reason when empty.I'm creating custom ports as follows:
The binary is treating the quoting as input and fails to run.
runcommand.log
output:If there isn't a ROM provided, it makes no sense to quote it.
The text was updated successfully, but these errors were encountered: