diff --git a/Common/System/Request.cpp b/Common/System/Request.cpp index 23f15f796e..687ac40f33 100644 --- a/Common/System/Request.cpp +++ b/Common/System/Request.cpp @@ -72,11 +72,11 @@ void RequestManager::ForgetRequestsWithToken(RequesterToken token) { } } -void RequestManager::PostSystemSuccess(int requestId, const char *responseString, int responseValue) { +void RequestManager::PostSystemSuccess(int requestId, std::string_view responseString, int responseValue) { std::lock_guard guard(callbackMutex_); auto iter = callbackMap_.find(requestId); if (iter == callbackMap_.end()) { - ERROR_LOG(Log::System, "PostSystemSuccess: Unexpected request ID %d (responseString=%s)", requestId, responseString); + ERROR_LOG(Log::System, "PostSystemSuccess: Unexpected request ID %d (responseString=%.*s)", requestId, (int)responseString.size(), responseString.data()); return; } @@ -86,7 +86,7 @@ void RequestManager::PostSystemSuccess(int requestId, const char *responseString response.responseString = responseString; response.responseValue = responseValue; pendingSuccesses_.push_back(response); - DEBUG_LOG(Log::System, "PostSystemSuccess: Request %d (%s, %d)", requestId, responseString, responseValue); + DEBUG_LOG(Log::System, "PostSystemSuccess: Request %d (%.*s, %d)", requestId, (int)responseString.size(), responseString.data(), responseValue); callbackMap_.erase(iter); } diff --git a/Common/System/Request.h b/Common/System/Request.h index e140877d9f..f3b5547a5f 100644 --- a/Common/System/Request.h +++ b/Common/System/Request.h @@ -4,6 +4,7 @@ #include #include #include +#include #include "Common/System/System.h" @@ -32,7 +33,7 @@ public: bool MakeSystemRequest(SystemRequestType type, RequesterToken token, RequestCallback callback, RequestFailedCallback failedCallback, std::string_view param1, std::string_view param2, int64_t param3, int64_t param4 = 0); // Called by the platform implementation, when it's finished with a request. - void PostSystemSuccess(int requestId, const char *responseString, int responseValue = 0); + void PostSystemSuccess(int requestId, std::string_view responseString, int responseValue = 0); void PostSystemFailure(int requestId); // This must be called every frame from the beginning of NativeFrame(). diff --git a/Core/HLE/sceMpeg.h b/Core/HLE/sceMpeg.h index c423419e99..8ad3cfd00c 100644 --- a/Core/HLE/sceMpeg.h +++ b/Core/HLE/sceMpeg.h @@ -68,7 +68,7 @@ struct SceMpegRingBuffer { u32_le callback_addr; // see sceMpegRingbufferPut s32_le callback_args; s32_le dataUpperBound; - s32_le semaID; // unused? + s32_le semaID; // unused? No, probably not, see #20084. Though when should we signal it? u32_le mpeg; // pointer to mpeg struct, fixed up in sceMpegCreate // Note: not available in all versions. u32_le gp; diff --git a/UI/OnScreenDisplay.cpp b/UI/OnScreenDisplay.cpp index b851afec07..dae0a438d2 100644 --- a/UI/OnScreenDisplay.cpp +++ b/UI/OnScreenDisplay.cpp @@ -310,6 +310,7 @@ void OnScreenMessagesView::Draw(UIContext &dc) { typeEdges[(size_t)OSDType::MESSAGE_CENTERED_WARNING] = ScreenEdgePosition::CENTER; typeEdges[(size_t)OSDType::MESSAGE_CENTERED_ERROR] = ScreenEdgePosition::CENTER; typeEdges[(size_t)OSDType::TRANSPARENT_STATUS] = ScreenEdgePosition::TOP_LEFT; + typeEdges[(size_t)OSDType::PROGRESS_BAR] = ScreenEdgePosition::TOP_CENTER; // These only function at the top currently, needs fixing. dc.SetFontStyle(dc.theme->uiFont); dc.SetFontScale(1.0f, 1.0f); diff --git a/Windows/main.cpp b/Windows/main.cpp index 8512ed5c38..d3189ff761 100644 --- a/Windows/main.cpp +++ b/Windows/main.cpp @@ -638,7 +638,7 @@ bool System_MakeRequest(SystemRequestType type, int requestId, const std::string // Unsupported. return false; } - bool load = type == SystemRequestType::BROWSE_FOR_FILE; + const bool load = type == SystemRequestType::BROWSE_FOR_FILE; std::thread([=] { std::string out; if (W32Util::BrowseForFileName(load, MainWindow::GetHWND(), ConvertUTF8ToWString(param1).c_str(), nullptr, filter.c_str(), L"", out)) { @@ -689,8 +689,7 @@ bool System_MakeRequest(SystemRequestType type, int requestId, const std::string case SystemRequestType::CREATE_GAME_SHORTCUT: { // Get the game info to get our hands on the icon png - Path gamePath(param1); - std::shared_ptr info = g_gameInfoCache->GetInfo(nullptr, gamePath, GameInfoFlags::ICON); + std::shared_ptr info = g_gameInfoCache->GetInfo(nullptr, Path(param1), GameInfoFlags::ICON); Path icoPath; if (info->icon.dataLoaded) { // Write the icon png out as a .ICO file so the shortcut can point to it @@ -710,8 +709,8 @@ bool System_MakeRequest(SystemRequestType type, int requestId, const std::string } case SystemRequestType::RUN_CALLBACK_IN_WNDPROC: { - auto func = reinterpret_cast(param3); - void *userdata = reinterpret_cast(param4); + auto func = reinterpret_cast((uintptr_t)param3); + void *userdata = reinterpret_cast((uintptr_t)param4); MainWindow::RunCallbackInWndProc(func, userdata); return true; }