mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-30 17:53:42 +01:00
Merge pull request #19745 from hrydgard/despam-port-error
De-spam an error message about ports
This commit is contained in:
5 files changed
+12
-12
No files matched your search
@@ -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 {
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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());
|
||||
};
|
||||
|
||||
@@ -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)");
|
||||
|
||||
@@ -48,8 +48,6 @@ class ImGeStateWindow {
|
||||
public:
|
||||
void Draw(ImConfig &cfg, ImControl &control, GPUDebugInterface *gpuDebug);
|
||||
void Snapshot();
|
||||
private:
|
||||
u32 prevState_[256]{};
|
||||
};
|
||||
|
||||
namespace Draw {
|
||||
|
||||
Reference in new issue
Block a user