Put missing check_state() in some places
Fixes a few verification failures while closing the emulator with HLE liblv2
This commit is contained in:
@@ -381,7 +381,10 @@ static NEVER_INLINE error_code savedata_op(ppu_thread& ppu, u32 operation, u32 v
|
|||||||
selected = Emu.GetCallbacks().get_save_dialog()->ShowSaveDataList(save_entries, focused, operation, listSet);
|
selected = Emu.GetCallbacks().get_save_dialog()->ShowSaveDataList(save_entries, focused, operation, listSet);
|
||||||
|
|
||||||
// Reschedule
|
// Reschedule
|
||||||
ppu.check_state();
|
if (ppu.check_state())
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
// UI returns -1 for new save games
|
// UI returns -1 for new save games
|
||||||
if (selected == -1)
|
if (selected == -1)
|
||||||
|
|||||||
@@ -297,6 +297,11 @@ error_code sys_lwcond_wait(ppu_thread& ppu, vm::ptr<sys_lwcond_t> lwcond, u64 ti
|
|||||||
// call the syscall
|
// call the syscall
|
||||||
const error_code res = _sys_lwcond_queue_wait(ppu, lwcond->lwcond_queue, lwmutex->sleep_queue, timeout);
|
const error_code res = _sys_lwcond_queue_wait(ppu, lwcond->lwcond_queue, lwmutex->sleep_queue, timeout);
|
||||||
|
|
||||||
|
if (ppu.test_stopped())
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (res == CELL_OK || res == CELL_ESRCH)
|
if (res == CELL_OK || res == CELL_ESRCH)
|
||||||
{
|
{
|
||||||
if (res == CELL_OK)
|
if (res == CELL_OK)
|
||||||
|
|||||||
@@ -167,6 +167,11 @@ error_code sys_lwmutex_lock(ppu_thread& ppu, vm::ptr<sys_lwmutex_t> lwmutex, u64
|
|||||||
// lock using the syscall
|
// lock using the syscall
|
||||||
const error_code res = _sys_lwmutex_lock(ppu, lwmutex->sleep_queue, timeout);
|
const error_code res = _sys_lwmutex_lock(ppu, lwmutex->sleep_queue, timeout);
|
||||||
|
|
||||||
|
if (ppu.test_stopped())
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
lwmutex->all_info--;
|
lwmutex->all_info--;
|
||||||
|
|
||||||
if (res == CELL_OK)
|
if (res == CELL_OK)
|
||||||
@@ -211,6 +216,11 @@ error_code sys_lwmutex_lock(ppu_thread& ppu, vm::ptr<sys_lwmutex_t> lwmutex, u64
|
|||||||
|
|
||||||
const error_code res_ = _sys_lwmutex_lock(ppu, lwmutex->sleep_queue, timeout);
|
const error_code res_ = _sys_lwmutex_lock(ppu, lwmutex->sleep_queue, timeout);
|
||||||
|
|
||||||
|
if (ppu.test_stopped())
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (res_ == CELL_OK)
|
if (res_ == CELL_OK)
|
||||||
{
|
{
|
||||||
lwmutex->vars.owner.release(tid);
|
lwmutex->vars.owner.release(tid);
|
||||||
|
|||||||
Reference in New Issue
Block a user