From 91f73a48915453dc1aa84debc4808f40eb7ca6f4 Mon Sep 17 00:00:00 2001 From: Daniel Nylander Date: Fri, 14 Feb 2025 02:28:39 +0100 Subject: [PATCH 1/7] Updated Swedish translation (#594) --- src/Ryujinx/Assets/locales.json | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/Ryujinx/Assets/locales.json b/src/Ryujinx/Assets/locales.json index dda498c59..9d8569501 100644 --- a/src/Ryujinx/Assets/locales.json +++ b/src/Ryujinx/Assets/locales.json @@ -589,7 +589,7 @@ "pl_PL": "", "pt_BR": "Iniciar jogos ocultando a interface", "ru_RU": "", - "sv_SE": "", + "sv_SE": "Starta spel med dolt användargränssnitt", "th_TH": "", "tr_TR": "", "uk_UA": "", @@ -2614,7 +2614,7 @@ "pl_PL": "", "pt_BR": "Extraia o RomFS de um arquivo DLC selecionado", "ru_RU": "", - "sv_SE": "", + "sv_SE": "Extrahera RomFS från en vald DLC-fil", "th_TH": "", "tr_TR": "", "uk_UA": "", @@ -4621,7 +4621,7 @@ "zh_CN": "繁体中文(推荐)", "zh_TW": "正體中文 (建議)" } - }, + }, { "ID": "SettingsTabSystemSystemLanguageSwedish", "Translations": { @@ -4646,7 +4646,7 @@ "zh_CN": "瑞典语", "zh_TW": "" } - }, + }, { "ID": "SettingsTabSystemSystemLanguageNorwegian", "Translations": { @@ -6464,7 +6464,7 @@ "pl_PL": "", "pt_BR": "", "ru_RU": "", - "sv_SE": "", + "sv_SE": "Ok", "th_TH": "ตกลง", "tr_TR": "Tamam", "uk_UA": "", @@ -8364,7 +8364,7 @@ "pl_PL": "", "pt_BR": "", "ru_RU": "", - "sv_SE": "", + "sv_SE": "Inaktivera", "th_TH": "", "tr_TR": "", "uk_UA": "", @@ -8389,7 +8389,7 @@ "pl_PL": "", "pt_BR": "", "ru_RU": "", - "sv_SE": "", + "sv_SE": "Regnbåge", "th_TH": "", "tr_TR": "", "uk_UA": "", @@ -8439,7 +8439,7 @@ "pl_PL": "", "pt_BR": "", "ru_RU": "", - "sv_SE": "", + "sv_SE": "Färg", "th_TH": "", "tr_TR": "", "uk_UA": "", @@ -15239,7 +15239,7 @@ "pl_PL": "Seria Amiibo", "pt_BR": "Franquia Amiibo", "ru_RU": "Серия Amiibo", - "sv_SE": "", + "sv_SE": "Amiibo-serie", "th_TH": "", "tr_TR": "Amiibo Serisi", "uk_UA": "Серія Amiibo", @@ -18664,7 +18664,7 @@ "pl_PL": "", "pt_BR": "{0} - Informação", "ru_RU": "{0} - Информация", - "sv_SE": "", + "sv_SE": "{0} - Information", "th_TH": "{0} – ข้อมูล", "tr_TR": "{0} - Bilgi", "uk_UA": "{0} - Інформація", @@ -19739,7 +19739,7 @@ "pl_PL": "", "pt_BR": "Configurações de LED", "ru_RU": "", - "sv_SE": "", + "sv_SE": "LED-inställningar", "th_TH": "", "tr_TR": "", "uk_UA": "", @@ -21939,7 +21939,7 @@ "pl_PL": "Głoś", "pt_BR": "", "ru_RU": "Громкость", - "sv_SE": "", + "sv_SE": "Volym", "th_TH": "ระดับเสียง", "tr_TR": "Ses", "uk_UA": "Гуч.", @@ -24014,7 +24014,7 @@ "pl_PL": "", "pt_BR": "Selecione um DLC para extrair", "ru_RU": "", - "sv_SE": "", + "sv_SE": "Välj en DLC att extrahera", "th_TH": "", "tr_TR": "", "uk_UA": "", -- 2.47.1 From 6b55d158b7cb2e3e30c238897b65b4d18dfd6982 Mon Sep 17 00:00:00 2001 From: Daenorth Date: Fri, 14 Feb 2025 05:38:55 +0100 Subject: [PATCH 2/7] Norwegian locale update & update Jackbox 5 & 6 compat (#658) --- docs/compatibility.csv | 4 +- src/Ryujinx/Assets/locales.json | 84 ++++++++++++++++----------------- 2 files changed, 44 insertions(+), 44 deletions(-) diff --git a/docs/compatibility.csv b/docs/compatibility.csv index 6cb10e8d8..7653ced9e 100644 --- a/docs/compatibility.csv +++ b/docs/compatibility.csv @@ -2988,8 +2988,8 @@ 010015D003EE4000,"The Jackbox Party Pack 2",online-working,playable,2022-08-22 18:23:40 0100CC80013D6000,"The Jackbox Party Pack 3",slow;online-working,playable,2022-08-22 18:41:06 0100E1F003EE8000,"The Jackbox Party Pack 4",online-working,playable,2022-08-22 18:56:34 -01006fe0096ac000,"The Jackbox Party Pack 5",ldn-untested,boots,2025-02-03 22:32:00 -01005a400db52000,"The Jackbox Party Pack 6",ldn-untested,boots,2025-02-03 22:32:00 +01006fe0096ac000,"The Jackbox Party Pack 5",slow;online-working,ingame,2025-02-14 05:32:00 +01005a400db52000,"The Jackbox Party Pack 6",slow;online-working,ingame,2025-02-14 05:26:00 010052C00B184000,"The Journey Down: Chapter One",nvdec,playable,2021-02-24 13:32:41 01006BC00B188000,"The Journey Down: Chapter Three",nvdec,playable,2021-02-24 13:45:27 01009AB00B186000,"The Journey Down: Chapter Two",nvdec,playable,2021-02-24 13:32:13 diff --git a/src/Ryujinx/Assets/locales.json b/src/Ryujinx/Assets/locales.json index 9d8569501..684051368 100644 --- a/src/Ryujinx/Assets/locales.json +++ b/src/Ryujinx/Assets/locales.json @@ -585,7 +585,7 @@ "it_IT": "", "ja_JP": "", "ko_KR": "UI를 숨긴 상태에서 게임 시작", - "no_NO": "", + "no_NO": "Start Spillet med UI Gjemt", "pl_PL": "", "pt_BR": "Iniciar jogos ocultando a interface", "ru_RU": "", @@ -1535,7 +1535,7 @@ "it_IT": "", "ja_JP": "", "ko_KR": "", - "no_NO": "", + "no_NO": "Utviklet av {0}", "pl_PL": "", "pt_BR": "Desenvolvido por {0}", "ru_RU": "", @@ -1835,7 +1835,7 @@ "it_IT": "", "ja_JP": "", "ko_KR": "", - "no_NO": "", + "no_NO": "Kompatibilitet", "pl_PL": "", "pt_BR": "Compatibilidade:", "ru_RU": "", @@ -1860,7 +1860,7 @@ "it_IT": "", "ja_JP": "", "ko_KR": "", - "no_NO": "", + "no_NO": "Tittel ID:", "pl_PL": "", "pt_BR": "ID do título:", "ru_RU": "", @@ -1885,7 +1885,7 @@ "it_IT": "", "ja_JP": "", "ko_KR": "", - "no_NO": "", + "no_NO": "Spill som Arrangeres: {0}", "pl_PL": "", "pt_BR": "Jogos hospedados: {0}", "ru_RU": "", @@ -1910,7 +1910,7 @@ "it_IT": "", "ja_JP": "", "ko_KR": "", - "no_NO": "", + "no_NO": "Online-spillere: {0}", "pl_PL": "", "pt_BR": "Jogadores Online: {0}", "ru_RU": "", @@ -2260,7 +2260,7 @@ "it_IT": "", "ja_JP": "", "ko_KR": "PPTC 캐시 제거", - "no_NO": "", + "no_NO": "Tøm PPTC-bufferen", "pl_PL": "", "pt_BR": "Limpar cache PPTC", "ru_RU": "", @@ -2285,7 +2285,7 @@ "it_IT": "", "ja_JP": "", "ko_KR": "앱의 모든 PPTC 캐시 파일 삭제", - "no_NO": "", + "no_NO": "Sletter alle PPTC-cache-filer for applikasjonen", "pl_PL": "", "pt_BR": "Apagar os arquivos de cache PPTC do aplicativo", "ru_RU": "", @@ -2760,7 +2760,7 @@ "it_IT": "", "ja_JP": "", "ko_KR": "호환성 항목 표시", - "no_NO": "", + "no_NO": "Vis kompatibilitetsoppføring", "pl_PL": "", "pt_BR": "Mostrar entrada de compatibilidade", "ru_RU": "", @@ -2785,7 +2785,7 @@ "it_IT": "", "ja_JP": "", "ko_KR": "일반적으로 도움말 메뉴를 통해 접근할 수 있는 호환성 목록에 선택한 게임을 표시합니다.", - "no_NO": "", + "no_NO": "Vis det valgte spillet i kompatibilitetslisten, som du vanligvis får tilgang til via Hjelp-menyen.", "pl_PL": "", "pt_BR": "Exibe o jogo selecionado na Lista de Compatibilidade, que normalmente pode ser acessada pelo menu Ajuda.", "ru_RU": "", @@ -2810,7 +2810,7 @@ "it_IT": "", "ja_JP": "", "ko_KR": "게임 통계 표시", - "no_NO": "", + "no_NO": "Vis Spill Info", "pl_PL": "", "pt_BR": "Mostrar informações do jogo", "ru_RU": "", @@ -2835,7 +2835,7 @@ "it_IT": "", "ja_JP": "", "ko_KR": "그리드 보기 레이아웃에서 누락된 현재 선택된 게임에 대한 다양한 정보를 표시합니다.", - "no_NO": "", + "no_NO": "Vis statistikk og detaljer om det valgte spillet.", "pl_PL": "", "pt_BR": "Mostrar estatísticas e detalhes sobre o jogo selecionado no momento.", "ru_RU": "", @@ -3360,7 +3360,7 @@ "it_IT": "", "ja_JP": "", "ko_KR": "", - "no_NO": "", + "no_NO": "Se etter Oppdateringer:", "pl_PL": "", "pt_BR": "Verificar atualizações:", "ru_RU": "", @@ -3385,7 +3385,7 @@ "it_IT": "", "ja_JP": "", "ko_KR": "", - "no_NO": "", + "no_NO": "Av", "pl_PL": "", "pt_BR": "Desligado", "ru_RU": "", @@ -3410,7 +3410,7 @@ "it_IT": "", "ja_JP": "", "ko_KR": "", - "no_NO": "", + "no_NO": "Spør", "pl_PL": "", "pt_BR": "", "ru_RU": "", @@ -3435,7 +3435,7 @@ "it_IT": "", "ja_JP": "", "ko_KR": "", - "no_NO": "", + "no_NO": "Bakgrunn", "pl_PL": "", "pt_BR": "Fundo", "ru_RU": "", @@ -3460,7 +3460,7 @@ "it_IT": "", "ja_JP": "", "ko_KR": "", - "no_NO": "", + "no_NO": "På Emulator Fokus Tapt:", "pl_PL": "", "pt_BR": "Ao perder o Foco do emulador:", "ru_RU": "", @@ -3485,7 +3485,7 @@ "it_IT": "", "ja_JP": "", "ko_KR": "", - "no_NO": "", + "no_NO": "Gjør Ingenting", "pl_PL": "", "pt_BR": "Não fazer nada", "ru_RU": "", @@ -3510,7 +3510,7 @@ "it_IT": "", "ja_JP": "", "ko_KR": "", - "no_NO": "", + "no_NO": "Blokkinngang", "pl_PL": "", "pt_BR": "Bloquear entrada", "ru_RU": "", @@ -3535,7 +3535,7 @@ "it_IT": "", "ja_JP": "", "ko_KR": "", - "no_NO": "", + "no_NO": "Demp Lyd", "pl_PL": "", "pt_BR": "Ficar mudo", "ru_RU": "", @@ -3560,7 +3560,7 @@ "it_IT": "", "ja_JP": "", "ko_KR": "", - "no_NO": "", + "no_NO": "Blokker Inputs og demp Volumet", "pl_PL": "", "pt_BR": "Bloquear entrada & Ficar mudo", "ru_RU": "", @@ -3585,7 +3585,7 @@ "it_IT": "", "ja_JP": "", "ko_KR": "", - "no_NO": "", + "no_NO": "Pause Emulatoren", "pl_PL": "", "pt_BR": "Pausar a emulação", "ru_RU": "", @@ -4635,7 +4635,7 @@ "it_IT": "", "ja_JP": "", "ko_KR": "스웨덴어", - "no_NO": "", + "no_NO": "Svensk", "pl_PL": "", "pt_BR": "", "ru_RU": "", @@ -4735,7 +4735,7 @@ "it_IT": "", "ja_JP": "", "ko_KR": "매치 시스템 시간", - "no_NO": "", + "no_NO": "Match systemtid", "pl_PL": "", "pt_BR": "Sincronizar data e hora com o sistema PC", "ru_RU": "", @@ -6010,7 +6010,7 @@ "it_IT": "", "ja_JP": "", "ko_KR": "", - "no_NO": "", + "no_NO": "Aktivere UI-logger", "pl_PL": "", "pt_BR": "Habilitar logs da IU", "ru_RU": "", @@ -6410,7 +6410,7 @@ "it_IT": "", "ja_JP": "", "ko_KR": "", - "no_NO": "", + "no_NO": "Tilbakestill innstillinger", "pl_PL": "", "pt_BR": "Redefinir configurações", "ru_RU": "", @@ -6435,7 +6435,7 @@ "it_IT": "", "ja_JP": "", "ko_KR": "", - "no_NO": "", + "no_NO": "Jeg vil tilbakestille innstillingene mine.", "pl_PL": "", "pt_BR": "Quero redefinir minhas configurações.", "ru_RU": "", @@ -8360,7 +8360,7 @@ "it_IT": "", "ja_JP": "", "ko_KR": "비활성화", - "no_NO": "", + "no_NO": "Deaktiver", "pl_PL": "", "pt_BR": "", "ru_RU": "", @@ -8385,7 +8385,7 @@ "it_IT": "", "ja_JP": "", "ko_KR": "레인보우", - "no_NO": "", + "no_NO": "Regnbue", "pl_PL": "", "pt_BR": "", "ru_RU": "", @@ -8410,7 +8410,7 @@ "it_IT": "", "ja_JP": "", "ko_KR": "레인보우 속도", - "no_NO": "", + "no_NO": "Regnbue Hastighet", "pl_PL": "", "pt_BR": "", "ru_RU": "", @@ -8435,7 +8435,7 @@ "it_IT": "", "ja_JP": "", "ko_KR": "색상", - "no_NO": "", + "no_NO": "Farge", "pl_PL": "", "pt_BR": "", "ru_RU": "", @@ -13685,7 +13685,7 @@ "it_IT": "", "ja_JP": "", "ko_KR": "다음에서 모든 PPTC 데이터를 제거하려고 합니다:\n\n{0}\n\n계속하시겠습니까?", - "no_NO": "", + "no_NO": "Du er i ferd med å slette alle PPTC-data fra:\n\n{0}\n\n\nEr du sikker på at du vil fortsette?", "pl_PL": "", "pt_BR": "Você está prestes a limpar todos os dados PPTC de:\n\n{0}\n\nTem certeza de que deseja continuar?", "ru_RU": "", @@ -17010,7 +17010,7 @@ "it_IT": "", "ja_JP": "", "ko_KR": "", - "no_NO": "", + "no_NO": "Skriver ut Avalonia (UI)-loggmeldinger i konsollen.", "pl_PL": "", "pt_BR": "Imprimir mensagens de log do Avalonia (IU) no console.", "ru_RU": "", @@ -17935,7 +17935,7 @@ "it_IT": "", "ja_JP": "", "ko_KR": "", - "no_NO": "", + "no_NO": "Oppdatering tilgjengelig!", "pl_PL": "", "pt_BR": "Atualização disponível!", "ru_RU": "", @@ -19735,7 +19735,7 @@ "it_IT": "", "ja_JP": "", "ko_KR": "LED 설정", - "no_NO": "", + "no_NO": "LED-innstillinger", "pl_PL": "", "pt_BR": "Configurações de LED", "ru_RU": "", @@ -23885,7 +23885,7 @@ "it_IT": "", "ja_JP": "", "ko_KR": "", - "no_NO": "", + "no_NO": "Starter opp og spiller uten krasj eller GPU-feil av noe slag, og med en hastighet som er rask nok til å ha rimelig glede av på en gjennomsnittlig PC.", "pl_PL": "", "pt_BR": "Inicializa e roda sem travamentos ou bugs de GPU de qualquer tipo, e em uma velocidade rápida o suficiente para ser aproveitado em um PC comum.", "ru_RU": "", @@ -23910,7 +23910,7 @@ "it_IT": "", "ja_JP": "", "ko_KR": "", - "no_NO": "", + "no_NO": "Starter og går i gang i spillet, men lider av ett eller flere av følgende: krasjer, fastlåser, GPU-feil, distraherende dårlig lyd eller er rett og slett for tregt. Spillet kan fortsatt spilles helt til ende, men ikke slik det er ment å spilles.", "pl_PL": "", "pt_BR": "Inicializa e entra no jogo, mas sofre de um ou mais dos seguintes: travamentos, deadlocks, bugs de GPU, áudio ruim que distrai ou é simplesmente muito lento. O jogo ainda pode ser jogado até o fim, mas não da forma como foi criado para ser jogado.", "ru_RU": "", @@ -23935,7 +23935,7 @@ "it_IT": "", "ja_JP": "", "ko_KR": "", - "no_NO": "", + "no_NO": "Starter opp og går forbi tittelskjermen, men kommer ikke inn i hovedspillet.", "pl_PL": "", "pt_BR": "Inicializa e passa da tela de título, mas não entra no jogo principal.", "ru_RU": "", @@ -23960,7 +23960,7 @@ "it_IT": "", "ja_JP": "", "ko_KR": "", - "no_NO": "", + "no_NO": "Starter, men kommer ikke lenger enn til tittelskjermen.", "pl_PL": "", "pt_BR": "Inizializa, mas não passa da tela de título.", "ru_RU": "", @@ -23985,7 +23985,7 @@ "it_IT": "", "ja_JP": "", "ko_KR": "", - "no_NO": "", + "no_NO": "Starter ikke opp eller viser ingen tegn til aktivitet.", "pl_PL": "", "pt_BR": "Não inicializa ou não mostra sinais de atividade.", "ru_RU": "", @@ -24035,7 +24035,7 @@ "it_IT": "", "ja_JP": "", "ko_KR": "", - "no_NO": "", + "no_NO": "Rikt nærværsbilde", "pl_PL": "", "pt_BR": "", "ru_RU": "", @@ -24060,7 +24060,7 @@ "it_IT": "", "ja_JP": "", "ko_KR": "", - "no_NO": "", + "no_NO": "Dynamisk og rik tilstedeværelse", "pl_PL": "", "pt_BR": "", "ru_RU": "", -- 2.47.1 From 6f2dce36283880e32730ced68f710e00536b7cb8 Mon Sep 17 00:00:00 2001 From: Vudjun Date: Fri, 14 Feb 2025 20:46:53 +0000 Subject: [PATCH 3/7] Add logging in socket implementation --- .../HOS/Services/Sockets/Bsd/IClient.cs | 12 ++- .../Sockets/Bsd/Impl/ManagedSocket.cs | 77 +++++++++++++++++++ .../Sockets/Bsd/Proxy/SocketHelpers.cs | 12 ++- 3 files changed, 99 insertions(+), 2 deletions(-) diff --git a/src/Ryujinx.HLE/HOS/Services/Sockets/Bsd/IClient.cs b/src/Ryujinx.HLE/HOS/Services/Sockets/Bsd/IClient.cs index 8475424ce..0f2b6dfb9 100644 --- a/src/Ryujinx.HLE/HOS/Services/Sockets/Bsd/IClient.cs +++ b/src/Ryujinx.HLE/HOS/Services/Sockets/Bsd/IClient.cs @@ -34,6 +34,10 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Bsd { if (errorCode != LinuxError.SUCCESS) { + if (errorCode != LinuxError.EWOULDBLOCK) + { + Logger.Warning?.Print(LogClass.ServiceBsd, $"Operation failed with error {errorCode}."); + } result = -1; } @@ -66,6 +70,8 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Bsd BsdSocketType type = (BsdSocketType)context.RequestData.ReadInt32(); ProtocolType protocol = (ProtocolType)context.RequestData.ReadInt32(); + Logger.Info?.PrintMsg(LogClass.ServiceBsd, $"Creating socket with domain={domain}, type={type}, protocol={protocol}"); + BsdSocketCreationFlags creationFlags = (BsdSocketCreationFlags)((int)type >> (int)BsdSocketCreationFlags.FlagsShift); type &= BsdSocketType.TypeMask; @@ -111,6 +117,7 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Bsd if (exempt) { + Logger.Info?.Print(LogClass.ServiceBsd, "Disconnecting exempt socket."); newBsdSocket.Disconnect(); } @@ -797,7 +804,10 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Bsd { errno = socket.Listen(backlog); } - + else + { + Logger.Warning?.PrintMsg(LogClass.ServiceBsd, "Invalid socket fd."); + } return WriteBsdResult(context, 0, errno); } diff --git a/src/Ryujinx.HLE/HOS/Services/Sockets/Bsd/Impl/ManagedSocket.cs b/src/Ryujinx.HLE/HOS/Services/Sockets/Bsd/Impl/ManagedSocket.cs index 981fe0a8f..5f07f018e 100644 --- a/src/Ryujinx.HLE/HOS/Services/Sockets/Bsd/Impl/ManagedSocket.cs +++ b/src/Ryujinx.HLE/HOS/Services/Sockets/Bsd/Impl/ManagedSocket.cs @@ -92,18 +92,34 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Bsd.Impl { newSocket = new ManagedSocket(Socket.Accept()); + var remoteEndPoint = newSocket.RemoteEndPoint as IPEndPoint; + bool isLDNPrivateIP = remoteEndPoint.Address.ToString().StartsWith("192.168."); + if (isLDNPrivateIP) + { + Logger.Info?.PrintMsg(LogClass.ServiceBsd, $"Accepted connection from {ProtocolType}/{remoteEndPoint.Address}:{remoteEndPoint.Port}"); + } + else + { + Logger.Info?.PrintMsg(LogClass.ServiceBsd, $"Accepted connection from {ProtocolType}/***:{remoteEndPoint.Port}"); + } + return LinuxError.SUCCESS; } catch (SocketException exception) { newSocket = null; + if (exception.SocketErrorCode != SocketError.WouldBlock) + { + Logger.Warning?.Print(LogClass.ServiceBsd, $"Socket Exception: {exception.ToString()}"); + } return WinSockHelper.ConvertError((WsaError)exception.ErrorCode); } } public LinuxError Bind(IPEndPoint localEndPoint) { + Logger.Info?.PrintMsg(LogClass.ServiceBsd, $"Socket binding to: {ProtocolType}/{localEndPoint.Port}"); try { Socket.Bind(localEndPoint); @@ -112,6 +128,10 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Bsd.Impl } catch (SocketException exception) { + if (exception.SocketErrorCode != SocketError.WouldBlock) + { + Logger.Warning?.Print(LogClass.ServiceBsd, $"Socket Exception: {exception.ToString()}"); + } return WinSockHelper.ConvertError((WsaError)exception.ErrorCode); } } @@ -123,6 +143,15 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Bsd.Impl public LinuxError Connect(IPEndPoint remoteEndPoint) { + bool isLDNPrivateIP = remoteEndPoint.Address.ToString().StartsWith("192.168."); + if (isLDNPrivateIP) + { + Logger.Info?.PrintMsg(LogClass.ServiceBsd, $"Connecting to: {ProtocolType}/{remoteEndPoint.Address}:{remoteEndPoint.Port}"); + } + else + { + Logger.Info?.PrintMsg(LogClass.ServiceBsd, $"Connecting to: {ProtocolType}/***:{remoteEndPoint.Port}"); + } try { Socket.Connect(remoteEndPoint); @@ -137,6 +166,10 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Bsd.Impl } else { + if (exception.SocketErrorCode != SocketError.WouldBlock) + { + Logger.Warning?.Print(LogClass.ServiceBsd, $"Socket Exception: {exception.ToString()}"); + } return WinSockHelper.ConvertError((WsaError)exception.ErrorCode); } } @@ -144,11 +177,13 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Bsd.Impl public void Disconnect() { + Logger.Info?.Print(LogClass.ServiceBsd, $"Socket disconnecting"); Socket.Disconnect(true); } public void Dispose() { + Logger.Info?.Print(LogClass.ServiceBsd, $"Socket closed"); Socket.Close(); Socket.Dispose(); } @@ -159,10 +194,16 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Bsd.Impl { Socket.Listen(backlog); + Logger.Info?.PrintMsg(LogClass.ServiceBsd, $"Socket listening: {ProtocolType}/{(Socket.LocalEndPoint as IPEndPoint).Port}"); + return LinuxError.SUCCESS; } catch (SocketException exception) { + if (exception.SocketErrorCode != SocketError.WouldBlock) + { + Logger.Warning?.Print(LogClass.ServiceBsd, $"Socket Exception: {exception.ToString()}"); + } return WinSockHelper.ConvertError((WsaError)exception.ErrorCode); } } @@ -182,6 +223,10 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Bsd.Impl } catch (SocketException exception) { + if (exception.SocketErrorCode != SocketError.WouldBlock) + { + Logger.Warning?.Print(LogClass.ServiceBsd, $"Socket Exception: {exception.ToString()}"); + } return WinSockHelper.ConvertError((WsaError)exception.ErrorCode); } } @@ -214,6 +259,10 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Bsd.Impl } catch (SocketException exception) { + if (exception.SocketErrorCode != SocketError.WouldBlock) + { + Logger.Warning?.Print(LogClass.ServiceBsd, $"Socket Exception: {exception.ToString()}"); + } receiveSize = -1; result = WinSockHelper.ConvertError((WsaError)exception.ErrorCode); @@ -265,6 +314,10 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Bsd.Impl } catch (SocketException exception) { + if (exception.SocketErrorCode != SocketError.WouldBlock) + { + Logger.Warning?.Print(LogClass.ServiceBsd, $"Socket Exception: {exception.ToString()}"); + } receiveSize = -1; result = WinSockHelper.ConvertError((WsaError)exception.ErrorCode); @@ -288,6 +341,10 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Bsd.Impl } catch (SocketException exception) { + if (exception.SocketErrorCode != SocketError.WouldBlock) + { + Logger.Warning?.Print(LogClass.ServiceBsd, $"Socket Exception: {exception.ToString()}"); + } sendSize = -1; return WinSockHelper.ConvertError((WsaError)exception.ErrorCode); @@ -304,6 +361,10 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Bsd.Impl } catch (SocketException exception) { + if (exception.SocketErrorCode != SocketError.WouldBlock) + { + Logger.Warning?.Print(LogClass.ServiceBsd, $"Socket Exception: {exception.ToString()}"); + } sendSize = -1; return WinSockHelper.ConvertError((WsaError)exception.ErrorCode); @@ -341,6 +402,10 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Bsd.Impl } catch (SocketException exception) { + if (exception.SocketErrorCode != SocketError.WouldBlock) + { + Logger.Warning?.Print(LogClass.ServiceBsd, $"Socket Exception: {exception.ToString()}"); + } return WinSockHelper.ConvertError((WsaError)exception.ErrorCode); } } @@ -387,6 +452,10 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Bsd.Impl } catch (SocketException exception) { + if (exception.SocketErrorCode != SocketError.WouldBlock) + { + Logger.Warning?.Print(LogClass.ServiceBsd, $"Socket Exception: {exception.ToString()}"); + } return WinSockHelper.ConvertError((WsaError)exception.ErrorCode); } } @@ -519,6 +588,10 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Bsd.Impl } catch (SocketException exception) { + if (exception.SocketErrorCode != SocketError.WouldBlock) + { + Logger.Warning?.Print(LogClass.ServiceBsd, $"Socket Exception: {exception.ToString()}"); + } return WinSockHelper.ConvertError((WsaError)exception.ErrorCode); } } @@ -557,6 +630,10 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Bsd.Impl } catch (SocketException exception) { + if (exception.SocketErrorCode != SocketError.WouldBlock) + { + Logger.Warning?.Print(LogClass.ServiceBsd, $"Socket Exception: {exception.ToString()}"); + } return WinSockHelper.ConvertError((WsaError)exception.ErrorCode); } } diff --git a/src/Ryujinx.HLE/HOS/Services/Sockets/Bsd/Proxy/SocketHelpers.cs b/src/Ryujinx.HLE/HOS/Services/Sockets/Bsd/Proxy/SocketHelpers.cs index 9f206176d..b442cf802 100644 --- a/src/Ryujinx.HLE/HOS/Services/Sockets/Bsd/Proxy/SocketHelpers.cs +++ b/src/Ryujinx.HLE/HOS/Services/Sockets/Bsd/Proxy/SocketHelpers.cs @@ -1,4 +1,6 @@ +using Ryujinx.Common.Logging; using Ryujinx.HLE.HOS.Services.Ldn.UserServiceCreator.LdnRyu.Proxy; +using Ryujinx.HLE.HOS.Services.Sockets.Bsd.Types; using System; using System.Collections.Generic; using System.Linq; @@ -64,10 +66,18 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Bsd.Proxy { if (_proxy.Supported(domain, type, protocol)) { + Logger.Info?.PrintMsg(LogClass.ServiceBsd, $"Socket is using LDN proxy"); return new LdnProxySocket(domain, type, protocol, _proxy); } + else + { + Logger.Warning?.PrintMsg(LogClass.ServiceBsd, $"LDN proxy does not support socket {domain}, {type}, {protocol}"); + } + } + else + { + Logger.Info?.PrintMsg(LogClass.ServiceBsd, $"Opening socket using host networking stack"); } - return new DefaultSocket(domain, type, protocol, lanInterfaceId); } } -- 2.47.1 From 54d79728433a8273f2f36a7cc5901f55725922e2 Mon Sep 17 00:00:00 2001 From: Evan Husted Date: Sat, 15 Feb 2025 21:04:42 -0600 Subject: [PATCH 4/7] Remove redundant ToString()s and remove the var usage --- .../Sockets/Bsd/Impl/ManagedSocket.cs | 56 +++++++++---------- 1 file changed, 26 insertions(+), 30 deletions(-) diff --git a/src/Ryujinx.HLE/HOS/Services/Sockets/Bsd/Impl/ManagedSocket.cs b/src/Ryujinx.HLE/HOS/Services/Sockets/Bsd/Impl/ManagedSocket.cs index 5f07f018e..3c367660a 100644 --- a/src/Ryujinx.HLE/HOS/Services/Sockets/Bsd/Impl/ManagedSocket.cs +++ b/src/Ryujinx.HLE/HOS/Services/Sockets/Bsd/Impl/ManagedSocket.cs @@ -92,16 +92,12 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Bsd.Impl { newSocket = new ManagedSocket(Socket.Accept()); - var remoteEndPoint = newSocket.RemoteEndPoint as IPEndPoint; - bool isLDNPrivateIP = remoteEndPoint.Address.ToString().StartsWith("192.168."); - if (isLDNPrivateIP) - { - Logger.Info?.PrintMsg(LogClass.ServiceBsd, $"Accepted connection from {ProtocolType}/{remoteEndPoint.Address}:{remoteEndPoint.Port}"); - } - else - { - Logger.Info?.PrintMsg(LogClass.ServiceBsd, $"Accepted connection from {ProtocolType}/***:{remoteEndPoint.Port}"); - } + IPEndPoint remoteEndPoint = newSocket.RemoteEndPoint; + bool isPrivateIp = remoteEndPoint.Address.ToString().StartsWith("192.168."); + Logger.Info?.PrintMsg(LogClass.ServiceBsd, + isPrivateIp + ? $"Accepted connection from {ProtocolType}/{remoteEndPoint.Address}:{remoteEndPoint.Port}" + : $"Accepted connection from {ProtocolType}/***:{remoteEndPoint.Port}"); return LinuxError.SUCCESS; } @@ -111,7 +107,7 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Bsd.Impl if (exception.SocketErrorCode != SocketError.WouldBlock) { - Logger.Warning?.Print(LogClass.ServiceBsd, $"Socket Exception: {exception.ToString()}"); + Logger.Warning?.Print(LogClass.ServiceBsd, $"Socket Exception: {exception}"); } return WinSockHelper.ConvertError((WsaError)exception.ErrorCode); } @@ -130,7 +126,7 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Bsd.Impl { if (exception.SocketErrorCode != SocketError.WouldBlock) { - Logger.Warning?.Print(LogClass.ServiceBsd, $"Socket Exception: {exception.ToString()}"); + Logger.Warning?.Print(LogClass.ServiceBsd, $"Socket Exception: {exception}"); } return WinSockHelper.ConvertError((WsaError)exception.ErrorCode); } @@ -168,7 +164,7 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Bsd.Impl { if (exception.SocketErrorCode != SocketError.WouldBlock) { - Logger.Warning?.Print(LogClass.ServiceBsd, $"Socket Exception: {exception.ToString()}"); + Logger.Warning?.Print(LogClass.ServiceBsd, $"Socket Exception: {exception}"); } return WinSockHelper.ConvertError((WsaError)exception.ErrorCode); } @@ -177,13 +173,13 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Bsd.Impl public void Disconnect() { - Logger.Info?.Print(LogClass.ServiceBsd, $"Socket disconnecting"); + Logger.Info?.Print(LogClass.ServiceBsd, "Socket disconnecting"); Socket.Disconnect(true); } public void Dispose() { - Logger.Info?.Print(LogClass.ServiceBsd, $"Socket closed"); + Logger.Info?.Print(LogClass.ServiceBsd, "Socket closed"); Socket.Close(); Socket.Dispose(); } @@ -202,7 +198,7 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Bsd.Impl { if (exception.SocketErrorCode != SocketError.WouldBlock) { - Logger.Warning?.Print(LogClass.ServiceBsd, $"Socket Exception: {exception.ToString()}"); + Logger.Warning?.Print(LogClass.ServiceBsd, $"Socket Exception: {exception}"); } return WinSockHelper.ConvertError((WsaError)exception.ErrorCode); } @@ -225,13 +221,13 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Bsd.Impl { if (exception.SocketErrorCode != SocketError.WouldBlock) { - Logger.Warning?.Print(LogClass.ServiceBsd, $"Socket Exception: {exception.ToString()}"); + Logger.Warning?.Print(LogClass.ServiceBsd, $"Socket Exception: {exception}"); } return WinSockHelper.ConvertError((WsaError)exception.ErrorCode); } } - bool hasEmittedBlockingWarning = false; + private bool _hasEmittedBlockingWarning; public LinuxError Receive(out int receiveSize, Span buffer, BsdSocketFlags flags) { @@ -247,10 +243,10 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Bsd.Impl shouldBlockAfterOperation = true; } - if (Blocking && !hasEmittedBlockingWarning) + if (Blocking && !_hasEmittedBlockingWarning) { Logger.Warning?.PrintMsg(LogClass.ServiceBsd, "Blocking socket operations are not yet working properly. Expect network errors."); - hasEmittedBlockingWarning = true; + _hasEmittedBlockingWarning = true; } receiveSize = Socket.Receive(buffer, ConvertBsdSocketFlags(flags)); @@ -261,7 +257,7 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Bsd.Impl { if (exception.SocketErrorCode != SocketError.WouldBlock) { - Logger.Warning?.Print(LogClass.ServiceBsd, $"Socket Exception: {exception.ToString()}"); + Logger.Warning?.Print(LogClass.ServiceBsd, $"Socket Exception: {exception}"); } receiveSize = -1; @@ -294,10 +290,10 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Bsd.Impl shouldBlockAfterOperation = true; } - if (Blocking && !hasEmittedBlockingWarning) + if (Blocking && !_hasEmittedBlockingWarning) { Logger.Warning?.PrintMsg(LogClass.ServiceBsd, "Blocking socket operations are not yet working properly. Expect network errors."); - hasEmittedBlockingWarning = true; + _hasEmittedBlockingWarning = true; } if (!Socket.IsBound) @@ -316,7 +312,7 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Bsd.Impl { if (exception.SocketErrorCode != SocketError.WouldBlock) { - Logger.Warning?.Print(LogClass.ServiceBsd, $"Socket Exception: {exception.ToString()}"); + Logger.Warning?.Print(LogClass.ServiceBsd, $"Socket Exception: {exception}"); } receiveSize = -1; @@ -343,7 +339,7 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Bsd.Impl { if (exception.SocketErrorCode != SocketError.WouldBlock) { - Logger.Warning?.Print(LogClass.ServiceBsd, $"Socket Exception: {exception.ToString()}"); + Logger.Warning?.Print(LogClass.ServiceBsd, $"Socket Exception: {exception}"); } sendSize = -1; @@ -363,7 +359,7 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Bsd.Impl { if (exception.SocketErrorCode != SocketError.WouldBlock) { - Logger.Warning?.Print(LogClass.ServiceBsd, $"Socket Exception: {exception.ToString()}"); + Logger.Warning?.Print(LogClass.ServiceBsd, $"Socket Exception: {exception}"); } sendSize = -1; @@ -404,7 +400,7 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Bsd.Impl { if (exception.SocketErrorCode != SocketError.WouldBlock) { - Logger.Warning?.Print(LogClass.ServiceBsd, $"Socket Exception: {exception.ToString()}"); + Logger.Warning?.Print(LogClass.ServiceBsd, $"Socket Exception: {exception}"); } return WinSockHelper.ConvertError((WsaError)exception.ErrorCode); } @@ -454,7 +450,7 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Bsd.Impl { if (exception.SocketErrorCode != SocketError.WouldBlock) { - Logger.Warning?.Print(LogClass.ServiceBsd, $"Socket Exception: {exception.ToString()}"); + Logger.Warning?.Print(LogClass.ServiceBsd, $"Socket Exception: {exception}"); } return WinSockHelper.ConvertError((WsaError)exception.ErrorCode); } @@ -590,7 +586,7 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Bsd.Impl { if (exception.SocketErrorCode != SocketError.WouldBlock) { - Logger.Warning?.Print(LogClass.ServiceBsd, $"Socket Exception: {exception.ToString()}"); + Logger.Warning?.Print(LogClass.ServiceBsd, $"Socket Exception: {exception}"); } return WinSockHelper.ConvertError((WsaError)exception.ErrorCode); } @@ -632,7 +628,7 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Bsd.Impl { if (exception.SocketErrorCode != SocketError.WouldBlock) { - Logger.Warning?.Print(LogClass.ServiceBsd, $"Socket Exception: {exception.ToString()}"); + Logger.Warning?.Print(LogClass.ServiceBsd, $"Socket Exception: {exception}"); } return WinSockHelper.ConvertError((WsaError)exception.ErrorCode); } -- 2.47.1 From 9658ed99a8b2c92fb40759354e323b0101ca9711 Mon Sep 17 00:00:00 2001 From: Evan Husted Date: Sun, 16 Feb 2025 00:42:28 -0600 Subject: [PATCH 5/7] Print the socket fd that was invalid --- src/Ryujinx.HLE/HOS/Services/Sockets/Bsd/IClient.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Ryujinx.HLE/HOS/Services/Sockets/Bsd/IClient.cs b/src/Ryujinx.HLE/HOS/Services/Sockets/Bsd/IClient.cs index 0f2b6dfb9..b8deb2c45 100644 --- a/src/Ryujinx.HLE/HOS/Services/Sockets/Bsd/IClient.cs +++ b/src/Ryujinx.HLE/HOS/Services/Sockets/Bsd/IClient.cs @@ -806,8 +806,9 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Bsd } else { - Logger.Warning?.PrintMsg(LogClass.ServiceBsd, "Invalid socket fd."); + Logger.Warning?.PrintMsg(LogClass.ServiceBsd, $"Invalid socket fd '{socketFd}'."); } + return WriteBsdResult(context, 0, errno); } -- 2.47.1 From 4823599b9cf2b1c7ed844b4c680d9a78e52c398f Mon Sep 17 00:00:00 2001 From: Evan Husted Date: Sun, 16 Feb 2025 00:45:50 -0600 Subject: [PATCH 6/7] UI: RPC: Remove git hash from RPC ryujinx logo hover information --- src/Ryujinx/DiscordIntegrationModule.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Ryujinx/DiscordIntegrationModule.cs b/src/Ryujinx/DiscordIntegrationModule.cs index 47fc8ad69..0ffbd198d 100644 --- a/src/Ryujinx/DiscordIntegrationModule.cs +++ b/src/Ryujinx/DiscordIntegrationModule.cs @@ -24,7 +24,7 @@ namespace Ryujinx.Ava private static readonly string _description = ReleaseInformation.IsValid - ? $"{VersionString} {ReleaseInformation.ReleaseChannelOwner}/{ReleaseInformation.ReleaseChannelSourceRepo}@{ReleaseInformation.BuildGitHash}" + ? $"{VersionString} {ReleaseInformation.ReleaseChannelOwner}/{ReleaseInformation.ReleaseChannelSourceRepo}" : "dev build"; private const string ApplicationId = "1293250299716173864"; -- 2.47.1 From 8046efbb11acf49315f1e09948c4cd95c8d87b86 Mon Sep 17 00:00:00 2001 From: Evan Husted Date: Sun, 16 Feb 2025 00:57:13 -0600 Subject: [PATCH 7/7] Revert "UI: RPC: Remove git hash from RPC ryujinx logo hover information" This reverts commit 4823599b9cf2b1c7ed844b4c680d9a78e52c398f. --- src/Ryujinx/DiscordIntegrationModule.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Ryujinx/DiscordIntegrationModule.cs b/src/Ryujinx/DiscordIntegrationModule.cs index 0ffbd198d..47fc8ad69 100644 --- a/src/Ryujinx/DiscordIntegrationModule.cs +++ b/src/Ryujinx/DiscordIntegrationModule.cs @@ -24,7 +24,7 @@ namespace Ryujinx.Ava private static readonly string _description = ReleaseInformation.IsValid - ? $"{VersionString} {ReleaseInformation.ReleaseChannelOwner}/{ReleaseInformation.ReleaseChannelSourceRepo}" + ? $"{VersionString} {ReleaseInformation.ReleaseChannelOwner}/{ReleaseInformation.ReleaseChannelSourceRepo}@{ReleaseInformation.BuildGitHash}" : "dev build"; private const string ApplicationId = "1293250299716173864"; -- 2.47.1