mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-06 06:55:09 +00:00
Add savestate buttons to home menu
This commit is contained in:
parent
a6313fa46c
commit
79d09d02ed
10 changed files with 142 additions and 10 deletions
|
|
@ -163,6 +163,13 @@ extern u64 get_sysutil_cb_manager_read_count()
|
|||
|
||||
extern bool send_open_home_menu_cmds()
|
||||
{
|
||||
auto status = g_fxo->try_get<SysutilMenuOpenStatus>();
|
||||
|
||||
if (!status || status->active)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// TODO: handle CELL_SYSUTIL_BGMPLAYBACK_STATUS_DISABLE
|
||||
if (sysutil_send_system_cmd(CELL_SYSUTIL_DRAWING_BEGIN, 0) < 0 ||
|
||||
sysutil_send_system_cmd(CELL_SYSUTIL_SYSTEM_MENU_OPEN, 0) < 0 ||
|
||||
|
|
@ -171,15 +178,25 @@ extern bool send_open_home_menu_cmds()
|
|||
return false;
|
||||
}
|
||||
|
||||
status->active = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
extern void send_close_home_menu_cmds()
|
||||
{
|
||||
auto status = g_fxo->try_get<SysutilMenuOpenStatus>();
|
||||
|
||||
if (!status || !status->active)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// TODO: handle CELL_SYSUTIL_BGMPLAYBACK_STATUS_DISABLE
|
||||
sysutil_send_system_cmd(CELL_SYSUTIL_BGMPLAYBACK_STOP, 0);
|
||||
sysutil_send_system_cmd(CELL_SYSUTIL_SYSTEM_MENU_CLOSE, 0);
|
||||
sysutil_send_system_cmd(CELL_SYSUTIL_DRAWING_END, 0);
|
||||
|
||||
status->active = false;
|
||||
}
|
||||
|
||||
template <>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue