-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
(CLI) Auto-detect Core when -L isn't present #746
Comments
This used to work for a long time. I'm not sure when the commit that broke this landed but |
Auto detect and disambiguate from the cli seems pointless. If retroarch is launched with a filename as an argument do a lookup in the playlists including history looking for that, if that is found and has a core associated then use that So:
|
Why pointless? I expect one of the use cases for this would be being able to associate retroarch with files in such a way that you can simply double click a rom from a file browser and have it open with retroarch (basically what's asked in #5614) without having to explicitly create playlists for it or having to set up wrappers to add the This is actually how most standalone emulators work. I would understand if it would seem hard (or maybe even impossible) to do it accurately in retroarch since the core cannot simply be guessed based on the extension, but I don't understand why would it seem pointless. When using the "Select file and detect core" option you get a list of "Suggested cores" when there's more than one core that could be used. It'd be great if that choice was given when it cannot be determined which core to use. |
Don't libretro cores have to declare a "supported extensions" field? You could use that to choose a default core, and add an option in the UI where the user can set cores for extensions. |
Not all extensions are native to a particular system (e.g. bin/cue), and not everyone will always want to use the same core to launch a particular system's content. |
Wouldn't those users have the option of using |
I'm going to admit openly that this is a slightly tricky UX problem. Only slightly, but still not entirely trivial. So we should expect that any solution is going to be somewhat of a compromise and may not cover certain extreme edgecases perfectly. (Opinionated feature rationale) However, currently due to lacking this feature, Retroarch is... not exactly unusable, but I have the entire SNES and NES libraries in my filesystem. I don't want to have to scroll through all those files using the gamepad-oriented Retroarch UI. Yes, I can use page-up/down to scroll more quickly, or more library-navigation features could be added to Retroarch (like searching), but in the end the problem for me is that I just don't like media library apps. Stuff like iTunes that wants you to import your files into its own internal organizational system. I feel like I already have a great media library management app on my computer - the filesystem - which I know how to use and am comfortable with. The mere fact that I have to tell Retroarch to scan directories before I can run anything, for instance, is enough of a nuisance. In the old days I used to just fire up Snes9x and drag-and-drop a ROM in, you know? Most media-library management type apps that I've used in past have made those features optional and allowed more traditional "file-oriented" usage. Retroarch should do the same. I suspect the only reason it doesn't already is due to the "gamepad-oriented" design - no desktop-oriented software would leave out this sort of feature. But Retroarch is trying to be a solution for both dedicated gaming hardware and desktops. The only real problem I foresee is the UI solution for when Retroarch really just doesn't know what core to use. The obvious solution is to just have it drop you to a "core select" screen, but the trouble is how to fit that into Retroarch's very "hierarchical", console-style UI. I mean, put it this way: if from that core select screen, I hit Backspace, where should I end up? |
It's not that noone wants this implemented, it's just that noone has worked on it. It can be more difficult than what one would expect. A work around I've done before is had a |
Yeah, the message to use Still, |
Why not just |
To be perfectly honest, the degree to which the lack of this complicates launching RetroArch from an external game browser is the number-one reason that I haven't yet tried switching from the RetroArch distributed in the Ubuntu repos to the Flatpak'd version. It's bad enough when I'm more or less hard-coding ...it's also one of the big reasons I prefer Mednafen over RetroArch for emulating any system that it supports. |
IKR? So many aspects of RetroArch make things completely unnecessarily time-consuming IMO; I fail to understand any of it. So what if certain file types aren't core-specific, or certain games for the same system are preferable with different cores? If any of the workarounds suggested in this thread are viable and easy to implement enough, this should at least still be an option for the many people who want external browser launching and the like; for use case scenarios where these complications don't apply. I think many would agree that just File Explorer and command line launching are very useful, time-saving features in general, and I hope this is at least considered more. |
I added a bash linux auto completetion script for the -L command, to complete and list the possible installed cores. If you don't know how to do this, you add a line like this to .bashrc
contents:
I think it has a bug in some situations, but i don't recall the bug, or when it happens. I know, not very helpful. Frankly, i don't understand most of the script, i just added the branches that checks the '-L' and '-M' parts and copied the structure of another script i had from a library that adds such things automatically when a project using it is installed in another python project. And of course, this is useless in windows. results in something like this when tab is pressed after -L:
I also think there is a way to do the main switches (not the ones with arguments) without specifying them all for forward compatibility, but i really don't understand how that works, so i decided not to. |
I believe that in order to have auto-completion that reads from the executable themselves what the options are so we don't need to specify that list of options that can get out of date or create a script for one single cmd line terminal type, requires some standard i don't know how it works. Several programs in python just install something like this:
And it works... for them... i think because they're using some kind of framework that can extract the option list from '--help' in 'complete_bash' or something (this doesn't actually seem to be a built-in from bash because i can't call it from there). If you try to use this directly, you'll see a nice env error, so it's worthless. Still, you can 'just' implement the original request, this was just a aside from the problems of this alternative. I wouldn't mind that functionality either. edit: Ah... i think the env error might be because my 'retroarch' is a alias, because i'm not installing it, just compiling from source and adding a alias. Replacing $1 in that script above by the path to the retroarch executable.... still doesn't work (it starts retroarch instead of decomposing the options). Which is probably not that strange, maybe it only works on python 'executables' (scripts) made with Typer which is the framework i use on my python projects that adds that bash completion script style. I also found a interesting bug - or maybe feature - with starting retroarch while a wine game is running alt-tabbed - it prevents retroarch from starting up because:
Error comes after ctrl-c, so it was hanging on libdecor i guess. It seems like wayland doesn't want you running two fullscreen applications I guess. Quit the game and it started again. Kind of cool, kind of annoying. Regardless, this is out of topic, and i'm stopping now, this was just to clarify the other comment. |
When running
retroarch "Mario.smc"
, have the core auto-detect and run.Since -L is not there, it will do its best job to Load Content and Run.
Yeah the title pretty much explains it.
It would be nice to not only have an auto detect function from within rgui, but from the command line as well.
It could try to autodetect first and if nothing matches just use libretro_path or it could be something like -a/--auto-detect.
The default behaviour could be also implemented in the retroarch.conf.
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered: