mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-01-30 03:32:55 +00:00
Stop LV2 Watchdog when CELL_SYSUTIL_REQUEST_EXITGAME is issued
This commit is contained in:
parent
d78e2dad29
commit
812224f7f7
@ -6,6 +6,7 @@
|
||||
#include "Emu/Cell/PPUModule.h"
|
||||
#include "Emu/Cell/Modules/cellGame.h"
|
||||
|
||||
#include "Emu/Cell/lv2/sys_game.h"
|
||||
#include "Emu/Cell/lv2/sys_process.h"
|
||||
#include "cellSysutil.h"
|
||||
|
||||
@ -126,6 +127,10 @@ extern s32 sysutil_send_system_cmd(u64 status, u64 param)
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
else if (status == CELL_SYSUTIL_REQUEST_EXITGAME)
|
||||
{
|
||||
abort_lv2_watchdog();
|
||||
}
|
||||
|
||||
for (sysutil_cb_manager::registered_cb cb : cbm->callbacks)
|
||||
{
|
||||
|
@ -82,6 +82,15 @@ struct watchdog_t
|
||||
static constexpr auto thread_name = "LV2 Watchdog Thread"sv;
|
||||
};
|
||||
|
||||
void abort_lv2_watchdog()
|
||||
{
|
||||
if (auto thr = g_fxo->try_get<named_thread<watchdog_t>>())
|
||||
{
|
||||
sys_game.notice("Aborting %s...", thr->thread_name);
|
||||
*thr = thread_state::aborting;
|
||||
}
|
||||
}
|
||||
|
||||
error_code _sys_game_watchdog_start(u32 timeout)
|
||||
{
|
||||
sys_game.trace("sys_game_watchdog_start(timeout=%d)", timeout);
|
||||
|
@ -1,5 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
void abort_lv2_watchdog();
|
||||
|
||||
error_code _sys_game_watchdog_start(u32 timeout);
|
||||
error_code _sys_game_watchdog_stop();
|
||||
error_code _sys_game_watchdog_clear();
|
||||
|
Loading…
x
Reference in New Issue
Block a user