Jump to file when using "Explore ROM Directory"

discussion about anything that needs to go here: https://sourceforge.net/p/quickplay/_li ... rce=navbar
User avatar
quickplayer
Posts: 18
Joined: Sun Aug 18, 2019 4:01 am

Jump to file when using "Explore ROM Directory"

Post by quickplayer » Thu Aug 22, 2019 6:06 am

If you click on a ROM and choose "Explore ROM Directory", the Windows File Explorer could highlight the corresponding ROM file automatically.
User avatar
butter100fly
Posts: 278
Joined: Fri Apr 29, 2016 8:13 am

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

Post by butter100fly » Fri Aug 30, 2019 10:42 am

Any ideas how to do that in the windows api? I guess i have the filename so its entirely possible...
User avatar
quickplayer
Posts: 18
Joined: Sun Aug 18, 2019 4:01 am

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

Post by quickplayer » Mon Sep 09, 2019 1:15 pm

There are some solutions on StackOverflow: https://www.google.com/search?client=fi ... g+explorer
User avatar
butter100fly
Posts: 278
Joined: Fri Apr 29, 2016 8:13 am

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

Post by butter100fly » Wed Sep 11, 2019 12:29 pm

Sure that seems like it might be trivial, i'll give that a go shortly. thanks
User avatar
butter100fly
Posts: 278
Joined: Fri Apr 29, 2016 8:13 am

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

Post by butter100fly » Fri Sep 20, 2019 7:34 am

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
User avatar
butter100fly
Posts: 278
Joined: Fri Apr 29, 2016 8:13 am

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

Post by butter100fly » Fri Sep 20, 2019 8:55 am

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
User avatar
butter100fly
Posts: 278
Joined: Fri Apr 29, 2016 8:13 am

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

Post by butter100fly » Fri Oct 04, 2019 8:04 pm

works well for me! Its going in the next release
AFaustini
Posts: 70
Joined: Fri May 06, 2016 12:24 pm

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

Post by AFaustini » Mon Oct 07, 2019 12:34 am

In the next release, the efind dats will be updated with the newest cores from retroarch?
User avatar
butter100fly
Posts: 278
Joined: Fri Apr 29, 2016 8:13 am

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

Post by butter100fly » Fri Oct 11, 2019 9:44 am

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
AFaustini
Posts: 70
Joined: Fri May 06, 2016 12:24 pm

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

Post by AFaustini » Sat Oct 12, 2019 12:31 am

I have updated the efind following your instructions.
Attachments
RetroArch.zip
(5.54 KiB) Downloaded 401 times
Post Reply