Core: Fix LnxFlatFileReader FinishRead return

This commit is contained in:
TellowKrinkle 2022-05-29 19:43:04 -05:00 committed by refractionpcsx2
parent bd5656bf89
commit 6aa7266084
1 changed files with 4 additions and 6 deletions

View File

@ -69,15 +69,13 @@ void FlatFileReader::BeginRead(void* pBuffer, uint sector, uint count)
int FlatFileReader::FinishRead(void)
{
int min_nr = 1;
int max_nr = 1;
struct io_event events[max_nr];
struct io_event event;
int event = io_getevents(m_aio_context, min_nr, max_nr, events, NULL);
if (event < 1)
int nevents = io_getevents(m_aio_context, 1, 1, &event, NULL);
if (nevents < 1)
return -1;
return 1;
return event.res;
}
void FlatFileReader::CancelRead(void)