From 3e98f16e6ba73373db6696d0806019f73ab6b50b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Sun, 5 Jan 2025 23:17:57 +0100 Subject: [PATCH] static-ify a bunch of functions --- Core/HLE/sceNp.cpp | 10 +++++----- Core/HLE/sceNp2.cpp | 4 ---- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/Core/HLE/sceNp.cpp b/Core/HLE/sceNp.cpp index 76f9682ee1..f044a210ac 100644 --- a/Core/HLE/sceNp.cpp +++ b/Core/HLE/sceNp.cpp @@ -53,7 +53,7 @@ std::map npAuthHandlers; // Tickets data are in big-endian based on captured packets -int writeTicketParam(u8* buffer, const u16_be type, const char* data = nullptr, const u16_be size = 0) { +static int writeTicketParam(u8* buffer, const u16_be type, const char* data = nullptr, const u16_be size = 0) { if (buffer == nullptr) return 0; u16_be sz = (data == nullptr)? static_cast(0): size; @@ -65,7 +65,7 @@ int writeTicketParam(u8* buffer, const u16_be type, const char* data = nullptr, return sz + 4; } -int writeTicketStringParam(u8* buffer, const u16_be type, const char* data = nullptr, const u16_be size = 0) { +static int writeTicketStringParam(u8* buffer, const u16_be type, const char* data = nullptr, const u16_be size = 0) { if (buffer == nullptr) return 0; u16_be sz = (data == nullptr) ? static_cast(0) : size; @@ -78,7 +78,7 @@ int writeTicketStringParam(u8* buffer, const u16_be type, const char* data = nul return sz + 4; } -int writeTicketU32Param(u8* buffer, const u16_be type, const u32_be data) { +static int writeTicketU32Param(u8* buffer, const u16_be type, const u32_be data) { if (buffer == nullptr) return 0; u16_be sz = 4; @@ -89,7 +89,7 @@ int writeTicketU32Param(u8* buffer, const u16_be type, const u32_be data) { return sz + 4; } -int writeTicketU64Param(u8* buffer, const u16_be type, const u64_be data) { +static int writeTicketU64Param(u8* buffer, const u16_be type, const u64_be data) { if (buffer == nullptr) return 0; u16_be sz = 8; @@ -100,7 +100,7 @@ int writeTicketU64Param(u8* buffer, const u16_be type, const u64_be data) { return sz + 4; } -void notifyNpAuthHandlers(u32 id, u32 result, u32 argAddr) { +static void notifyNpAuthHandlers(u32 id, u32 result, u32 argAddr) { std::lock_guard npAuthGuard(npAuthEvtMtx); npAuthEvents.push_back({ { id, result, argAddr } }); } diff --git a/Core/HLE/sceNp2.cpp b/Core/HLE/sceNp2.cpp index a03829a23c..8d6a087121 100644 --- a/Core/HLE/sceNp2.cpp +++ b/Core/HLE/sceNp2.cpp @@ -15,9 +15,6 @@ // Official git repository and contact information can be found at // https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/. -// This is pretty much a stub implementation. Doesn't actually do anything, just tries to return values -// to keep games happy anyway. - #include #include #include @@ -28,7 +25,6 @@ #include "Core/HLE/sceNp.h" #include "Core/HLE/sceNp2.h" - bool npMatching2Inited = false; SceNpAuthMemoryStat npMatching2MemStat = {};