Page 1 of 2

Jump to file when using "Explore ROM Directory"

Posted: Thu Aug 22, 2019 6:06 am
by quickplayer
If you click on a ROM and choose "Explore ROM Directory", the Windows File Explorer could highlight the corresponding ROM file automatically.

Re: Jump to file when using "Explore ROM Directory"

Posted: Fri Aug 30, 2019 10:42 am
by butter100fly
Any ideas how to do that in the windows api? I guess i have the filename so its entirely possible...

Re: Jump to file when using "Explore ROM Directory"

Posted: Mon Sep 09, 2019 1:15 pm
by quickplayer
There are some solutions on StackOverflow: https://www.google.com/search?client=fi ... g+explorer

Re: Jump to file when using "Explore ROM Directory"

Posted: Wed Sep 11, 2019 12:29 pm
by butter100fly
Sure that seems like it might be trivial, i'll give that a go shortly. thanks

Re: Jump to file when using "Explore ROM Directory"

Posted: Fri Sep 20, 2019 7:34 am
by butter100fly

Code: Select all

procedure TQPROM.BrowseToROM();
begin
  if DirectoryExists(ExtractFilePath(_Path)) then
    JCLShell.ShellExecEx(ExtractFilePath(_path))
  else
    raise EJException.create(J_DIRECTORY_NOT_EXIST);
end;
source code for JCLShell:: https://github.com/project-jedi/jcl/blo ... lShell.pas

Re: Jump to file when using "Explore ROM Directory"

Posted: Fri Sep 20, 2019 8:55 am
by butter100fly
I used the shellAPI in the .pas file this was in and changed this procedure to:

Code: Select all

procedure TQPROM.BrowseToROM();
var
  select : PAnsiChar;
begin
  if DirectoryExists(ExtractFilePath(_Path)) then
  begin
  select := PAnsiChar('/select,' + _Path)   ;
  //JCLShell.ShellExecEx(ExtractFilePath(_path))
  ShellExecute(0, nil, 'explorer.exe', select, nil,
  SW_SHOWNORMAL)
  end
  else
    raise EJException.create(J_DIRECTORY_NOT_EXIST);
end;
seems to work ok from basic uses (even getting the correct error message from upstream if the file doesn't exist), however there is a caution here https://stackoverflow.com/a/15301028/3536094 that suggests this can be flaky, i've noted that in the code, and as usual will be testing this myself as I go. If its not that flaky, this will go in the next release

Re: Jump to file when using "Explore ROM Directory"

Posted: Fri Oct 04, 2019 8:04 pm
by butter100fly
works well for me! Its going in the next release

Re: Jump to file when using "Explore ROM Directory"

Posted: Mon Oct 07, 2019 12:34 am
by AFaustini
In the next release, the efind dats will be updated with the newest cores from retroarch?

Re: Jump to file when using "Explore ROM Directory"

Posted: Fri Oct 11, 2019 9:44 am
by butter100fly
No there won't be time to do that now, i've done a great deal of coding and I need to release asap - if somone else could update the RetroArch efind for RetroArch changes and send them to me, i'll make sure they go in!

To do that I find methodically comparing each EFind entry to the info files here:
https://github.com/libretro/libretro-su ... /dist/info
to be very useful: it makes it really quick to see the call, the media supported and the system type for each system in turn.

Otherwise i'll do this at my next opportunity

Re: Jump to file when using "Explore ROM Directory"

Posted: Sat Oct 12, 2019 12:31 am
by AFaustini
I have updated the efind following your instructions.