mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-06 15:05:59 +00:00
rpcn: throw exception when using rpcn features without a proper config
This commit is contained in:
parent
14c0289542
commit
1d7a00666e
7 changed files with 47 additions and 30 deletions
|
|
@ -13,6 +13,7 @@
|
|||
#include "Emu/NP/rpcn_config.h"
|
||||
#include "Emu/NP/np_helpers.h"
|
||||
#include "Emu/NP/vport0.h"
|
||||
#include "Emu/system_config.h"
|
||||
|
||||
#include "util/asm.hpp"
|
||||
|
||||
|
|
@ -148,8 +149,13 @@ namespace rpcn
|
|||
sem_authentified.release();
|
||||
}
|
||||
|
||||
std::shared_ptr<rpcn_client> rpcn_client::get_instance()
|
||||
std::shared_ptr<rpcn_client> rpcn_client::get_instance(bool check_config)
|
||||
{
|
||||
if (check_config && g_cfg.net.psn_status != np_psn_status::psn_rpcn)
|
||||
{
|
||||
fmt::throw_exception("RPCN is required to use PSN online features.");
|
||||
}
|
||||
|
||||
std::shared_ptr<rpcn_client> sptr;
|
||||
|
||||
std::lock_guard lock(inst_mutex);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue