xenia
xenia copied to clipboard
[STFS] Add critical section to file reading
Affected titles: https://github.com/xenia-project/game-compatibility/issues/827 https://github.com/xenia-project/game-compatibility/issues/125
Description: These titles use multiple threads to load same file, which in case of extracted file doesn't make any issue, however for STFS package it is huge problem as it can randomly receive incorrect data.
I checked it multiple times and calculated hashes of loaded data between extracted and packed game. Conclusion for me is simple, at certain point thread starts getting invalid data, which is simply resolved by including critical section