parser: add support for GAME section
For the rationale of this: https://github.com/yifanlu/taiHEN/issues/78
This will allow to shorten config.txt a huge amount when many games are involved.
I've tested this with oclockvita and it works (e.g. button combo only works in games, meaning the plugin isn't anywhere it's not supposed to be)
Good job.
So did this give you the ability to exclude certain plugins with homebrew? I'm currently trying to exclude VHS from retroarch but not been successful
You can already do that by specifying halt points, if I'm remembering retroarch's titleid correctly, something like:
*!RETROARCH
*ALL
ur0:tai/plugin.suprx
will exclude all following plugins from loading in retroarch. As in, it stops processing anything else in the file if the program's titleID is RETROARCH.
For your usecase @Durelle, taihen can already exclude a certain title from loading any further plugins. It's not about excluding plugins, but about excluding titles from further processing of plugins. Order of sections is important in the config file.
What this patch adds is an alternative to *ALL named *GAME that only injects plugins into titles with an ID formed like an official sony title, e.g. PCS[A-I][0-9][0-9][0-9][0-9][0-9] which can be used as such:
*GAME
ur0:tai/plugin.suprx
The patch was never merged for whatever reason (even though it works perfectly fine and is useful), so if you want it you'll need to compile taihen with this PR manually applied. This was mainly intended to simplify the taihen config file so you didn't need 100 lines of haltpoints for system apps and another sixteen or so excluding homebrew before an *ALL section, or alternatively manually specifying every title individually.
Thanks for the contribution. I am poorly placed to decide what is convenience for users in this regard, hence the hesitation with this pull request. I've had few (zero) complaints regarding the problem this code solves.
Can you detail to me the use case for this? An example would be great.
@DaveeFTW this was at a moment when the VSH menu was only working in games and not in system apps. But we will soon have a better VSH menu.
So you can close this request. Adding *GAME is not useful.
Most plugins are simply better at bailing out on unsupported applications now, so the original use case is somewhat gone. Some still don't work right injected in homebrew or games, but even so this is probably the wrong solution.
In retrospect it does raise questions. Should there be a *SYSTEM specifier for NPXS and co? *HOMEBREW?
Or rather, if this sort of complexity is needed, why not just turn the titleid into a regex and be done? It's not like configs would break from that, you could just slap
*PCS[A-I][0-9][0-9][0-9][0-9][0-9]
ur0:tai/plugin.suprx
in the file and be done, and no existing configs would break.
I'm fine with leaving what happens to this PR to Davee rather than closing it myself. I do think myself that plugins being less crap lately weakens any argument for inclusion, and something like interpreting regular expressions would be far more useful than this PR, which is kind of a hack imho.
(If anyone gets double notified, apparently github disabled Markdown for email replies now, which broke the formatting. Annoying.)