Noita
Catovitch Nov 7, 2020 @ 5:20pm
Open Gif Directory: How to respect default file manager
Thanks for a really neat game!

Pretty minor thing, but maybe also a very quick change to improve it:

The Open Gif Directory option in the menus always opens File Explorer, not the default file manager (which isn't always File Explorer; e.g. Directory Opus).

I'm not sure how the game is implemented, but if the Windows version is calling ShellExecute or ShellExecuteEx on the folder path, you just need to use the null (default) verb instead of "open" and it'll work with alternative file managers.

(You don't need to do anything for any specific file manager or make it configurable, just call ShellExecute or ShellExecuteEx on the folder with null for the verb, and let it open the folder in the machine's configured way.)

The SHOpenFolderAndSelectItems API is another option, which would also let you select the specific GIF file which had just been generated. But I think that does not work with as many alternative file managers because it is harder for them to hook.
Date Posted: Nov 7, 2020 @ 5:20pm
Posts: 0