mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-12 09:48:37 +12:00
Rewrite cellNetCtlNetStartDialogLoadAsync hack
This commit is contained in:
parent
de9d859f4a
commit
f580bee32c
1 changed files with 14 additions and 10 deletions
|
@ -223,6 +223,19 @@ error_code cellNetCtlGetInfo(s32 code, vm::ptr<CellNetCtlInfo> info)
|
||||||
return CELL_OK;
|
return CELL_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
struct netstart_hack
|
||||||
|
{
|
||||||
|
static constexpr std::string_view thread_name = "NetStart Hack";
|
||||||
|
|
||||||
|
void operator()(int)
|
||||||
|
{
|
||||||
|
thread_ctrl::wait_for(500'000);
|
||||||
|
|
||||||
|
sysutil_send_system_cmd(CELL_SYSUTIL_NET_CTL_NETSTART_LOADED, 0);
|
||||||
|
sysutil_send_system_cmd(CELL_SYSUTIL_NET_CTL_NETSTART_FINISHED, 0);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
error_code cellNetCtlNetStartDialogLoadAsync(vm::cptr<CellNetCtlNetStartDialogParam> param)
|
error_code cellNetCtlNetStartDialogLoadAsync(vm::cptr<CellNetCtlNetStartDialogParam> param)
|
||||||
{
|
{
|
||||||
cellNetCtl.error("cellNetCtlNetStartDialogLoadAsync(param=*0x%x)", param);
|
cellNetCtl.error("cellNetCtlNetStartDialogLoadAsync(param=*0x%x)", param);
|
||||||
|
@ -250,16 +263,7 @@ error_code cellNetCtlNetStartDialogLoadAsync(vm::cptr<CellNetCtlNetStartDialogPa
|
||||||
}
|
}
|
||||||
|
|
||||||
// This is a hack for Diva F 2nd that registers the sysutil callback after calling this function.
|
// This is a hack for Diva F 2nd that registers the sysutil callback after calling this function.
|
||||||
g_fxo->init<named_thread>("Delayed cellNetCtlNetStartDialogLoadAsync messages", []()
|
g_fxo->get<named_thread<netstart_hack>>()->operator()(0);
|
||||||
{
|
|
||||||
lv2_obj::wait_timeout(500000, nullptr);
|
|
||||||
|
|
||||||
if (thread_ctrl::state() != thread_state::aborting)
|
|
||||||
{
|
|
||||||
sysutil_send_system_cmd(CELL_SYSUTIL_NET_CTL_NETSTART_LOADED, 0);
|
|
||||||
sysutil_send_system_cmd(CELL_SYSUTIL_NET_CTL_NETSTART_FINISHED, 0);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
return CELL_OK;
|
return CELL_OK;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue