RetroAchievements / RALibretro

RALibretro is a multi-emulator used to develop RetroAchievements.
https://retroachievements.org
GNU General Public License v3.0
186 stars 37 forks source link

make vfs_seek behave like fseek #421

Closed Jamiras closed 2 months ago

Jamiras commented 3 months ago

The header file says that retro_vfs_seek_t should return the new position, or -1 on error (this is true prior to the recent doc expansion as well).

But the implementation (at least for unbuffered files calls fseek), which returns 0 on success, not the offset.

The quasi88 core is treating any non-zero return value as a failure, so because I was explicitly returning the new offset, the core would refuse to start games.

I've asked the libretro team for clarification on this behavior, without an response. Since this mimics the RetroArch behavior, I think it's correct.