diff --git a/Common/Log/LogManager.cpp b/Common/Log/LogManager.cpp index 93ba3fee93..6e192df66a 100644 --- a/Common/Log/LogManager.cpp +++ b/Common/Log/LogManager.cpp @@ -271,7 +271,7 @@ void LogManager::LogLine(LogLevel level, Log type, const char *file, int line, c const char *threadName; #if PPSSPP_PLATFORM(WINDOWS) || PPSSPP_PLATFORM(MAC) const char *hostThreadName = GetCurrentThreadName(); - if (hostThreadName && strcmp(hostThreadName, "EmuThread") != 0 || !hleCurrentThreadName) { + if ((hostThreadName && strcmp(hostThreadName, "EmuThread") != 0) || !hleCurrentThreadName) { // Use the host thread name. threadName = hostThreadName; } else { diff --git a/Core/HLE/sceNetAdhoc.cpp b/Core/HLE/sceNetAdhoc.cpp index 5433f18ac9..cc0b5242fa 100644 --- a/Core/HLE/sceNetAdhoc.cpp +++ b/Core/HLE/sceNetAdhoc.cpp @@ -281,7 +281,7 @@ static void __GameModeNotify(u64 userdata, int cyclesLate) { if (peer != NULL) truncate_cpy(name, sizeof(name), (const char*)peer->nickname.data); WARN_LOG(Log::sceNet, "GameMode: Unknown Source Port from [%s][%s:%u -> %u] (Result=%i, Size=%i)", name, mac2str(&sendermac).c_str(), senderport, ADHOC_GAMEMODE_PORT, ret, bufsz); - g_OSD.Show(OSDType::MESSAGE_WARNING, std::string(n->T("GM: Data from Unknown Port")) + std::string(" [") + std::string(name) + std::string("]:") + std::to_string(senderport) + std::string(" -> ") + std::to_string(ADHOC_GAMEMODE_PORT) + std::string(" (") + std::to_string(portOffset) + std::string(")")); + g_OSD.Show(OSDType::MESSAGE_WARNING, std::string(n->T("GM: Data from Unknown Port")) + std::string(" [") + std::string(name) + std::string("]:") + std::to_string(senderport) + std::string(" -> ") + std::to_string(ADHOC_GAMEMODE_PORT) + std::string(" (") + std::to_string(portOffset) + std::string(")"), 0.0f, "unknownport"); peerlock.unlock(); } // Keeping track of the source port for further communication, in case it was re-mapped by router or ISP for some reason. @@ -1512,7 +1512,7 @@ static int sceNetAdhocPdpCreate(const char *mac, int port, int bufferSize, u32 f if (iResult == SOCKET_ERROR) { ERROR_LOG(Log::sceNet, "Socket error (%i) when binding port %u", errno, ntohs(addr.sin_port)); auto n = GetI18NCategory(I18NCat::NETWORKING); - g_OSD.Show(OSDType::MESSAGE_ERROR, std::string(n->T("Failed to Bind Port")) + " " + std::to_string(port + portOffset) + "\n" + std::string(n->T("Please change your Port Offset"))); + g_OSD.Show(OSDType::MESSAGE_ERROR, std::string(n->T("Failed to Bind Port")) + " " + std::to_string(port + portOffset) + "\n" + std::string(n->T("Please change your Port Offset")), 0.0f, "portbindfail"); return hleLogDebug(Log::sceNet, ERROR_NET_ADHOC_PORT_NOT_AVAIL, "port not available"); } @@ -3527,7 +3527,8 @@ static int sceNetAdhocPtpOpen(const char *srcmac, int sport, const char *dstmac, else { ERROR_LOG(Log::sceNet, "Socket error (%i) when binding port %u", errno, ntohs(addr.sin_port)); auto n = GetI18NCategory(I18NCat::NETWORKING); - g_OSD.Show(OSDType::MESSAGE_ERROR, std::string(n->T("Failed to Bind Port")) + " " + std::to_string(sport + portOffset) + "\n" + std::string(n->T("Please change your Port Offset"))); + g_OSD.Show(OSDType::MESSAGE_ERROR, + std::string(n->T("Failed to Bind Port")) + " " + std::to_string(sport + portOffset) + "\n" + std::string(n->T("Please change your Port Offset")), 0.0f, "portbindfail"); } // Close Socket @@ -4121,7 +4122,7 @@ static int sceNetAdhocPtpListen(const char *srcmac, int sport, int bufsize, int } else { auto n = GetI18NCategory(I18NCat::NETWORKING); - g_OSD.Show(OSDType::MESSAGE_ERROR, std::string(n->T("Failed to Bind Port")) + " " + std::to_string(sport + portOffset) + "\n" + std::string(n->T("Please change your Port Offset"))); + g_OSD.Show(OSDType::MESSAGE_ERROR, std::string(n->T("Failed to Bind Port")) + " " + std::to_string(sport + portOffset) + "\n" + std::string(n->T("Please change your Port Offset")), 0.0f, "portbindfail"); } if (iResult == SOCKET_ERROR) { @@ -7805,7 +7806,7 @@ int matchingInputThread(int matchingId) // TODO: The MatchingInput thread is usi if (peer != NULL) truncate_cpy(name, sizeof(name), (const char*)peer->nickname.data); WARN_LOG(Log::sceNet, "InputLoop[%d]: Unknown Source Port from [%s][%s:%u -> %u] (Recved=%i, Length=%i)", matchingId, name, mac2str(&sendermac).c_str(), senderport, context->port, recvresult, rxbuflen); - g_OSD.Show(OSDType::MESSAGE_WARNING, std::string(n->T("AM: Data from Unknown Port")) + std::string(" [") + std::string(name) + std::string("]:") + std::to_string(senderport) + std::string(" -> ") + std::to_string(context->port) + std::string(" (") + std::to_string(portOffset) + std::string(")")); + g_OSD.Show(OSDType::MESSAGE_WARNING, std::string(n->T("AM: Data from Unknown Port")) + std::string(" [") + std::string(name) + std::string("]:") + std::to_string(senderport) + std::string(" -> ") + std::to_string(context->port) + std::string(" (") + std::to_string(portOffset) + std::string(")"), 0.0f, "unknowndata"); } // Keep tracks of re-mapped peer's ports for further communication. // Note: This will only works if this player were able to receives data on normal port from other players (ie. this player's port wasn't remapped) diff --git a/SDL/CocoaBarItems.mm b/SDL/CocoaBarItems.mm index 3e84ff6034..58abf05e89 100644 --- a/SDL/CocoaBarItems.mm +++ b/SDL/CocoaBarItems.mm @@ -644,8 +644,7 @@ TOGGLE_METHOD(FullScreen, g_Config.bFullScreen, System_MakeRequest(SystemRequest } -(void)openSystemFileBrowser { - int g = 0; - DarwinDirectoryPanelCallback panelCallback = [g] (bool succ, Path thePathChosen) { + DarwinDirectoryPanelCallback panelCallback = [] (bool succ, Path thePathChosen) { if (succ) System_PostUIMessage(UIMessage::REQUEST_GAME_BOOT, thePathChosen.c_str()); }; diff --git a/UI/ImDebugger/ImGe.cpp b/UI/ImDebugger/ImGe.cpp index d9e2159437..973c3c017c 100644 --- a/UI/ImDebugger/ImGe.cpp +++ b/UI/ImDebugger/ImGe.cpp @@ -270,7 +270,7 @@ void ImGePixelViewer::UpdateTexture(Draw::DrawContext *draw) { uint32_t *dst32 = (uint32_t *)dst; uint16_t *src16 = (uint16_t *)dst; for (int x = 0; x < width; x++) { - dst[x] = (src16[x] >> 15) ? 0xFFFFFFFF : 0xFF000000; + dst32[x] = (src16[x] >> 15) ? 0xFFFFFFFF : 0xFF000000; } } else { ConvertRGBA5551ToRGBA8888((u32 *)dst, (const u16 *)src, width); @@ -732,6 +732,8 @@ void ImGeDebuggerWindow::NotifyStep() { swViewer_.showAlpha = false; swViewer_.useAlpha = false; break; + default: + break; } FramebufferManagerCommon *fbman = gpuDebug->GetFramebufferManagerCommon(); @@ -1017,7 +1019,7 @@ void ImGeDebuggerWindow::Draw(ImConfig &cfg, ImControl &control, GPUDebugInterfa if (lookup->FormatValueAt(temp, sizeof(temp), x, y)) { ImGui::Text("(%d, %d): %s", x, y, temp); } else { - ImGui::Text("%d, %d: N/A"); + ImGui::Text("%d, %d: N/A", x, y); } } else { ImGui::TextUnformatted("(no pixel hovered)"); diff --git a/UI/ImDebugger/ImGe.h b/UI/ImDebugger/ImGe.h index 25333bda1d..c642b620ef 100644 --- a/UI/ImDebugger/ImGe.h +++ b/UI/ImDebugger/ImGe.h @@ -48,8 +48,6 @@ class ImGeStateWindow { public: void Draw(ImConfig &cfg, ImControl &control, GPUDebugInterface *gpuDebug); void Snapshot(); -private: - u32 prevState_[256]{}; }; namespace Draw {