diff --git a/rpcs3/Crypto/key_vault.cpp b/rpcs3/Crypto/key_vault.cpp index 90bd043a09..5cbc04ac02 100644 --- a/rpcs3/Crypto/key_vault.cpp +++ b/rpcs3/Crypto/key_vault.cpp @@ -593,17 +593,17 @@ void KeyVault::LoadSelfUNK7Keys() 0x0F); } -SELF_KEY KeyVault::GetSelfLV0Key() +SELF_KEY KeyVault::GetSelfLV0Key() const { return sk_LV0_arr[0]; } -SELF_KEY KeyVault::GetSelfLDRKey() +SELF_KEY KeyVault::GetSelfLDRKey() const { return sk_LDR_arr[0]; } -SELF_KEY KeyVault::GetSelfLV1Key(u64 version) +SELF_KEY KeyVault::GetSelfLV1Key(u64 version) const { SELF_KEY key(0, 0, 0, "", "", "", "", 0); @@ -619,7 +619,7 @@ SELF_KEY KeyVault::GetSelfLV1Key(u64 version) return key; } -SELF_KEY KeyVault::GetSelfLV2Key(u64 version) +SELF_KEY KeyVault::GetSelfLV2Key(u64 version) const { SELF_KEY key(0, 0, 0, "", "", "", "", 0); @@ -635,7 +635,7 @@ SELF_KEY KeyVault::GetSelfLV2Key(u64 version) return key; } -SELF_KEY KeyVault::GetSelfISOKey(u16 revision, u64 version) +SELF_KEY KeyVault::GetSelfISOKey(u16 revision, u64 version) const { SELF_KEY key(0, 0, 0, "", "", "", "", 0); @@ -652,7 +652,7 @@ SELF_KEY KeyVault::GetSelfISOKey(u16 revision, u64 version) return key; } -SELF_KEY KeyVault::GetSelfAPPKey(u16 revision) +SELF_KEY KeyVault::GetSelfAPPKey(u16 revision) const { SELF_KEY key(0, 0, 0, "", "", "", "", 0); @@ -668,7 +668,7 @@ SELF_KEY KeyVault::GetSelfAPPKey(u16 revision) return key; } -SELF_KEY KeyVault::GetSelfUNK7Key(u64 version) +SELF_KEY KeyVault::GetSelfUNK7Key(u64 version) const { SELF_KEY key(0, 0, 0, "", "", "", "", 0); @@ -684,7 +684,7 @@ SELF_KEY KeyVault::GetSelfUNK7Key(u64 version) return key; } -SELF_KEY KeyVault::GetSelfNPDRMKey(u16 revision) +SELF_KEY KeyVault::GetSelfNPDRMKey(u16 revision) const { SELF_KEY key(0, 0, 0, "", "", "", "", 0); diff --git a/rpcs3/Crypto/key_vault.h b/rpcs3/Crypto/key_vault.h index d5fabaf829..e57cfe5b90 100644 --- a/rpcs3/Crypto/key_vault.h +++ b/rpcs3/Crypto/key_vault.h @@ -131,14 +131,14 @@ private: void LoadSelfAPPKeys(); void LoadSelfUNK7Keys(); void LoadSelfNPDRMKeys(); - SELF_KEY GetSelfLV0Key(); - SELF_KEY GetSelfLDRKey(); - SELF_KEY GetSelfLV1Key(u64 version); - SELF_KEY GetSelfLV2Key(u64 version); - SELF_KEY GetSelfISOKey(u16 revision, u64 version); - SELF_KEY GetSelfAPPKey(u16 revision); - SELF_KEY GetSelfUNK7Key(u64 version); - SELF_KEY GetSelfNPDRMKey(u16 revision); + SELF_KEY GetSelfLV0Key() const; + SELF_KEY GetSelfLDRKey() const; + SELF_KEY GetSelfLV1Key(u64 version) const; + SELF_KEY GetSelfLV2Key(u64 version) const; + SELF_KEY GetSelfISOKey(u16 revision, u64 version) const; + SELF_KEY GetSelfAPPKey(u16 revision) const; + SELF_KEY GetSelfUNK7Key(u64 version) const; + SELF_KEY GetSelfNPDRMKey(u16 revision) const; }; // RAP to RIF function. diff --git a/rpcs3/Emu/ARMv7/ARMv7Interpreter.h b/rpcs3/Emu/ARMv7/ARMv7Interpreter.h index 90c40af351..aa2a05b212 100644 --- a/rpcs3/Emu/ARMv7/ARMv7Interpreter.h +++ b/rpcs3/Emu/ARMv7/ARMv7Interpreter.h @@ -233,7 +233,7 @@ public: return result; } - bool ConditionPassed(u8 cond) + bool ConditionPassed(u8 cond) const { bool result = false; diff --git a/rpcs3/Emu/Cell/PPUProgramCompiler.cpp b/rpcs3/Emu/Cell/PPUProgramCompiler.cpp index fcc47c1bec..9c3b760ea7 100644 --- a/rpcs3/Emu/Cell/PPUProgramCompiler.cpp +++ b/rpcs3/Emu/Cell/PPUProgramCompiler.cpp @@ -528,7 +528,7 @@ void CompilePPUProgram::LoadArgs() m_end_args = m_args.size() > 0; } -u32 CompilePPUProgram::GetBranchValue(const std::string& branch_name) +u32 CompilePPUProgram::GetBranchValue(const std::string& branch_name) const { for(const Branch& branch : m_branches) { diff --git a/rpcs3/Emu/Cell/PPUProgramCompiler.h b/rpcs3/Emu/Cell/PPUProgramCompiler.h index 70c46b9952..608fbc4c1e 100644 --- a/rpcs3/Emu/Cell/PPUProgramCompiler.h +++ b/rpcs3/Emu/Cell/PPUProgramCompiler.h @@ -147,7 +147,7 @@ protected: void DetectArgInfo(Arg& arg); void LoadArgs(); - u32 GetBranchValue(const std::string& branch); + u32 GetBranchValue(const std::string& branch) const; bool SetNextArgType(u32 types, bool show_err = true); bool SetNextArgBranch(u8 aa, bool show_err = true); diff --git a/rpcs3/Emu/Cell/SPURSManager.h b/rpcs3/Emu/Cell/SPURSManager.h index 6d17f4e373..ccfbcc16e8 100644 --- a/rpcs3/Emu/Cell/SPURSManager.h +++ b/rpcs3/Emu/Cell/SPURSManager.h @@ -29,12 +29,12 @@ class SPURSManagerEventFlag public: SPURSManagerEventFlag(u32 flagClearMode, u32 flagDirection); - u32 _getDirection() + u32 _getDirection() const { return this->flagDirection; } - u32 _getClearMode () + u32 _getClearMode() const { return this->flagClearMode; } diff --git a/rpcs3/Emu/Cell/SPUThread.h b/rpcs3/Emu/Cell/SPUThread.h index 64168066bb..daeac60b89 100644 --- a/rpcs3/Emu/Cell/SPUThread.h +++ b/rpcs3/Emu/Cell/SPUThread.h @@ -145,7 +145,7 @@ public: this->low = this->low & mask; } //Slice 0 or 1 - u8 checkSliceRounding(u8 slice) + u8 checkSliceRounding(u8 slice) const { switch(slice) { diff --git a/rpcs3/Emu/SysCalls/ModuleManager.cpp b/rpcs3/Emu/SysCalls/ModuleManager.cpp index 89db1b531a..1bcb6e7466 100644 --- a/rpcs3/Emu/SysCalls/ModuleManager.cpp +++ b/rpcs3/Emu/SysCalls/ModuleManager.cpp @@ -316,7 +316,7 @@ ModuleManager::~ModuleManager() UnloadModules(); } -bool ModuleManager::IsLoadedFunc(u32 id) +bool ModuleManager::IsLoadedFunc(u32 id) const { for (u32 i = 0; i info) int cellNetCtlNetStartDialogLoadAsync(vm::ptr param) { - cellNetCtl->Todo("cellNetCtlNetStartDialogLoadAsync(param_addr=0x%x)", param.addr()); + cellNetCtl->Warning("cellNetCtlNetStartDialogLoadAsync(param_addr=0x%x)", param.addr()); + // TODO: Actually sign into PSN + Emu.GetCallbackManager().m_exit_callback.Handle(CELL_SYSUTIL_NET_CTL_NETSTART_FINISHED, 0); return CELL_OK; } @@ -66,8 +69,9 @@ int cellNetCtlNetStartDialogAbortAsync() int cellNetCtlNetStartDialogUnloadAsync(vm::ptr result) { - cellNetCtl->Todo("cellNetCtlNetStartDialogUnloadAsync(result_addr=0x%x)", result.addr()); + cellNetCtl->Warning("cellNetCtlNetStartDialogUnloadAsync(result_addr=0x%x)", result.addr()); + Emu.GetCallbackManager().m_exit_callback.Handle(CELL_SYSUTIL_NET_CTL_NETSTART_UNLOADED, 0); return CELL_OK; } diff --git a/rpcs3/Emu/SysCalls/Modules/cellNetCtl.h b/rpcs3/Emu/SysCalls/Modules/cellNetCtl.h index 6f6b18d653..11b6695518 100644 --- a/rpcs3/Emu/SysCalls/Modules/cellNetCtl.h +++ b/rpcs3/Emu/SysCalls/Modules/cellNetCtl.h @@ -239,7 +239,7 @@ struct CellNetCtlNetStartDialogParam { be_t size; be_t type; - be_t cid; + be_t cid; // Unused }; struct CellNetCtlNetStartDialogResult @@ -257,4 +257,4 @@ struct CellNetCtlNatInfo be_t mapped_addr; }; -typedef void(*cellNetCtlHandler)(s32 prev_state, s32 new_state, s32 event, s32 error_code, vm::ptr> arg); \ No newline at end of file +typedef void(*cellNetCtlHandler)(s32 prev_state, s32 new_state, s32 event, s32 error_code, vm::ptr> arg); diff --git a/rpcs3/Emu/SysCalls/Modules/cellResc.cpp b/rpcs3/Emu/SysCalls/Modules/cellResc.cpp index 4759d3eeba..ded452bda3 100644 --- a/rpcs3/Emu/SysCalls/Modules/cellResc.cpp +++ b/rpcs3/Emu/SysCalls/Modules/cellResc.cpp @@ -926,13 +926,7 @@ int cellRescSetSrc(s32 idx, vm::ptr src) return CELL_RESC_ERROR_NOT_INITIALIZED; } - if(idx < 0 || SRC_BUFFER_NUM <= idx) - { - cellResc->Error("cellRescSetSrc : CELL_RESC_ERROR_BAD_ARGUMENT"); - return CELL_RESC_ERROR_BAD_ARGUMENT; - } - - if(src->width < 1 || 4096 < src->width || src->height < 1 || 4096 < src->height) + if (idx < 0 || idx >= SRC_BUFFER_NUM || src->width < 1 || src->width > 4096 || src->height < 1 || src->height > 4096) { cellResc->Error("cellRescSetSrc : CELL_RESC_ERROR_BAD_ARGUMENT"); return CELL_RESC_ERROR_BAD_ARGUMENT; diff --git a/rpcs3/Emu/SysCalls/SysCalls.h b/rpcs3/Emu/SysCalls/SysCalls.h index 0c72003b6d..514e36ddd6 100644 --- a/rpcs3/Emu/SysCalls/SysCalls.h +++ b/rpcs3/Emu/SysCalls/SysCalls.h @@ -43,7 +43,8 @@ public: return GetIdManager().CheckID(id) && GetIdManager().GetID(id).m_name == GetName(); } - template bool CheckId(u32 id, T*& data) + template + bool CheckId(u32 id, T*& data) const { return detail::CheckId(id,data,GetName()); } diff --git a/rpcs3/Ini.h b/rpcs3/Ini.h index 967ed92124..efb7813cde 100644 --- a/rpcs3/Ini.h +++ b/rpcs3/Ini.h @@ -64,7 +64,7 @@ template struct IniEntry : public Ini m_value = value; } - T GetValue() + T GetValue() const { return m_value; }