Synchronize IO operations before any seek.

To prevent it from seeking before the operation.
This commit is contained in:
Unknown W. Brackets 2014-03-02 13:47:11 -08:00
parent 2c40cd509a
commit 07a2e57932

View file

@ -1024,6 +1024,11 @@ u32 npdrmLseek(FileNode *f, s32 where, FileMove whence)
s64 __IoLseekDest(FileNode *f, s64 offset, int whence, FileMove &seek) {
seek = FILEMOVE_BEGIN;
// Let's make sure this isn't incorrect mid-operation.
if (ioManager.HasOperation(f->handle)) {
ioManager.SyncThread();
}
s64 newPos = 0;
switch (whence) {
case 0: