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.04k stars 2.15k forks source link

[Qt] Homebrew download doesn't work on Linux #8711

Closed sergiobenrocha2 closed 7 years ago

sergiobenrocha2 commented 8 years ago

Homebrew download is not working on Linux, it can't find ~/.local/share/ppsspp//ppsspp.dl. It seems PPSSPP is not creating this path at first.

Issue is happening only on Qt, SDL port works fine.

I: http_client.cpp:401: Completed downloading http://store.ppsspp.org/index.json to memory
I: http_client.cpp:401: Completed downloading http://store.ppsspp.org/icons/cavestory_icon0.png to memory
16:22:539 UI/Store.cpp:278 I[HLE]: Triggering install of http://store.ppsspp.org/files/cavestory.zip
I: http_client.cpp:401: Completed downloading http://store.ppsspp.org/files/cavestory.zip to /home/sergio/.local/share/ppsspp//ppsspp.dl
E: http_client.cpp:403: Failed writing download to /home/sergio/.local/share/ppsspp//ppsspp.dl
16:29:056 Util/GameManager.cpp:101 I[HLE]: Download completed! Status = 200
16:29:056 Util/GameManager.cpp:105 E[HLE]: Downloaded file /home/sergio/.local/share/ppsspp//ppsspp.dl does not exist :(
unknownbrackets commented 8 years ago

Why is that .local instead of .config? Does SDL use the same path?

-[Unknown]

sergiobenrocha2 commented 7 years ago

SDL saves the game at ~/.config/ppsspp/PSP/GAME/

I can see a ppsspp.dl in Core/Util/GameManager.cpp:

return g_Config.externalDirectory + "/ppsspp.dl";
sergiobenrocha2 commented 7 years ago

SDL saves the temporary file to /tmp/ppsspp.dl, while Qt tries to save at ~/.local/share/ppsspp//ppsspp.dl

Changing that line from GameManager.cpp to

return "tmp/ppsspp.dl";

works. Maybe g_Config.externalDirectory is mis-configured in Qt?

unknownbrackets commented 7 years ago

It's coming form here:

https://github.com/hrydgard/ppsspp/blob/master/ext/native/base/QtMain.cpp#L440

SDL passes /tmp. This may be an issue for iOS as well @hrydgard. Maybe we should just use memstickDirectory as a writable temp dir?

-[Unknown]

hrydgard commented 7 years ago

Hm, yes, that seems wrong... I'll change it to use memstickDirectory as a temporary dir, yeah, that should be safest.

sergiobenrocha2 commented 7 years ago

It's working now, thanks. It's saving the tmp file in ~/.config/ppsspp//ppsspp.dl now