hrydgard / ppsspp

A PSP emulator for Android, Windows, Mac and Linux, written in C++. Want to contribute? Join us on Discord at https://discord.gg/5NJB6dD or just send pull requests / issues. For discussion use the forums at forums.ppsspp.org.
https://www.ppsspp.org
Other
11.09k stars 2.16k forks source link

iOS: Recents pointing to games in the app's Documents doesn't work properly #19211

Closed hrydgard closed 4 months ago

hrydgard commented 4 months ago

This is simply because every time you launch, the app's Documents directory changes.

More info: https://stackoverflow.com/questions/47864143/document-directory-path-change-when-rebuild-application

Since we store the full absolute paths in Recents in the ini file, they won't match, so won't work.

For now, I think I'll try to detect if it's a Documents directory, and patch in the current Documents path.

I wonder if we have more cases of absolute filenames being stored like that... probably:

Features affected by this

Workarounds

For Recents, I'll just patch up any Documents paths on load, since it's easy to know what they should be.

For a more general solution, there seems to be something called Bookmarks: https://developer.apple.com/library/archive/documentation/FileManagement/Conceptual/FileSystemProgrammingGuide/AccessingFilesandDirectories/AccessingFilesandDirectories.html#//apple_ref/doc/uid/TP40010672-CH3

Should look into that, may be relevant for some cases.

Halo-Michael commented 4 months ago

Documents path won't change "every time" but do change when upgrade apps/etc. So basiclly should still do that.