batocera-linux/batocera-emulationstation

Issue with {game:fanart} image and "Optimize images VRAM use"

pajarorrojo opened this issue · 6 comments

Concerned project

Batocera

Distribution Version

39-dev-d84a44e957 2023/12/17 23:59

Architecture

Steam Deck

Issue description

Hello,
The game carousel behaves abruptly and the transition between games isn't smooth when VRAM is enabled for images in the developer options. If I disable VRAM optimizations for images, it becomes smooth.

Scenario, how to reproduce:

- VRAM optimizations for images enabled in developer options
- Playstation-X theme with background Fanart enabled in game lists

If I disable Fanart in theme options, it displays smoothly with VRAM enabled. If I disable optimized VRAM, it always displays smoothly with fanart or not.

Attached a video, the effect might not be very clear, but it can help to understand and reproduce what I mentioned above

capture-2023.12.20-17h12.54.1.mp4

Logs and data

No response

I don't see anything on your video.
If I test the theme myself I don't see any problem...

In the video, it's hardly noticeable due to the poor rendering of the same video. I've created a new video with only one item in the carousel to maximize the effect. You'll see that the game box dont slide and disappears before reaching the edge of the screen when VRAM is activated. To reproduce the issue, it's necessary for the game to have fanart media, otherwise, this won't occur.

capture-2023.12.20-23h37.45.1.mp4

I don't reproduce.

I fixed a lot of things in this commit db2b0ab which is not part of the version you are working with.
It's probably related.

You'll have to wait for the next release ( or test it with Retrobat, updated with the latest continuous build of emulationstation )
If it's fine with the next version, please close the issue.
If not... We'll see...

Okay, understood. Thank you

I found something with your theme that could cause your problem.

The fanart images are defined to be displayed bigger than then screen resolution ( 1.001 1.001).

In the current code, the async loader is limited to the screen resolution (in 1080p images are loaded 1920x1080 even if asked bigger ), but the control asks for a bigger image (something like 1922x1082), and the loader returns 1980x1080, and the controls ask for a bigger one... So it keeps on asking loading image and this is done in a synchrounous way, which can cause lags.

I'll make a fix for this particular case, but you should not use a size that makes an image bigger than screen resolution.
Set minSize to 1 and use scaling instead.

Okay, makes sense, I'll remove all the 1.001 instances from my theme. Thanks for your time again ;)