Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Texture replacement no longer works in ZIP #19785

Closed
4 of 5 tasks
CristobalManga opened this issue Dec 30, 2024 · 5 comments · Fixed by #19860
Closed
4 of 5 tasks

Texture replacement no longer works in ZIP #19785

CristobalManga opened this issue Dec 30, 2024 · 5 comments · Fixed by #19860

Comments

@CristobalManga
Copy link

Game or games this happens in

All

What area of the game / PPSSPP

I don't know if it's a bug or a feature that was removed.
But I have several texture packs in zip format and I open them from PPSSPP and they install perfectly, but I don't know from which version it stopped working, since even if I install the texture pack they don't work.

I go to the PPSSPP folder and look for the textures.zip and everything is correct.

It only works when we unzip that zip in the game's SLUS, but previously it worked perfectly with the zip.

What should happen

Recognize textures.zip.

PPSSPP actually recognizes them but there is no change in textures

Logs

No response

Platform

Android

Mobile device model or graphics card (GPU)

LG G8

PPSSPP version affected

1.18.1

Last working version

I don't remember

Graphics backend (3D API)

Vulkan

Checklist

  • Test in the latest git build in case it's already fixed.
  • Search for other reports of the same issue.
  • Try resetting settings or older versions and include if the issue is related.
  • Try without any cheats and without loading any save states.
  • Include logs or screenshots of issue.
@hrydgard
Copy link
Owner

hrydgard commented Dec 31, 2024

Hm, how about the latest builds from https://www.ppsspp.org/devbuilds/ ? I thought I tested zip files fairly recently...

Also, can you link some specific pack that doesn't work?

@hrydgard hrydgard added this to the v1.19.0 milestone Dec 31, 2024
@CristobalManga
Copy link
Author

Hm, how about the latest builds from https://www.ppsspp.org/devbuilds/ ? I thought I tested zip files fairly recently...

Also, can you link some specific pack that doesn't work?

Sorry for replying too late.

I've already tried the latest PPSSPP builds, but the problem persists.
I might not be able to give an exact date, but the problem could have started with builds from 3 months ago. It could be.

Well, I also tested on Windows, and the same problem is found there as well.

This is the link to the texture pack: https://drive.google.com/file/d/1yjEnRg3YYf_oJSXX2NTX3jQD1KxPdoQ1/view?usp=drive_link

As we can see it already has the tag:
[games]
ULUS10390 = textures.ini
ULES01214 = textures.ini

So the installation works correctly.
But it seems that even though it installs correctly, ppsspp no ​​longer recognizes texture packs in ZIP. Although it is strange because PPSSPP when opening the game, says that the texture pack is activated in green.

The texture pack works correctly if it is unzipped, but the problem is that the zip packages stopped working.

@palop4l
Copy link

palop4l commented Jan 11, 2025

This is also happened to me as well. The last working version is 1.17.4 i believe, the official build not the nightly ones. Started to broke in 1.18 so i had to unpack every zipped texture files i installed. Tested on iPad.

@Nukem9
Copy link
Contributor

Nukem9 commented Jan 11, 2025

ReplacedImageType imageType = Identify(vfs_, openFile, &magic);

  • OpenFileForRead() succeeds and a valid handle to a compressed stream is returned.
  • Identify() reads 4 bytes from the stream to determine header magic.
  • Identify() then calls vfs->Rewind() to reset the stream's seek position. libzip does not support seeking compressed or encrypted streams and sets an error flag.
  • Subsequent vfs reads fail.

Some files appear to work because they're packed in a .zip and not compressed...? Not sure about that part.

@hrydgard
Copy link
Owner

hrydgard commented Jan 11, 2025

Oh! So that's it. Texture packs should use uncompressed ZIPs (since images are already compressed enough), but I guess we need to be robust against them not following that advice.

I'll restore the code to re-open the file in Rewind.

Though technically, there's really no reason it couldn't support seeking to position 0...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants