Compare commits
3 Commits
Canary-1.2
...
a114657c8a
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a114657c8a | ||
|
|
bcbe589964 | ||
|
|
d406c42e15 |
@@ -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",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
|
||||
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
|
||||
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
|
||||
|
||||
|
@@ -186,7 +186,7 @@ namespace ARMeilleure.Translation.Cache
|
||||
|
||||
int newRegionNumber = _activeRegionIndex;
|
||||
|
||||
Logger.Warning?.Print(LogClass.Cpu, $"JIT Cache Region {exhaustedRegion} exhausted, creating new Cache Region {newRegionNumber} ({((long)(newRegionNumber + 1) * CacheSize).Bytes()} Total Allocation).");
|
||||
Logger.Warning?.Print(LogClass.Cpu, $"JIT Cache Region {exhaustedRegion} exhausted, creating new Cache Region {newRegionNumber} ({((newRegionNumber + 1) * CacheSize).Bytes()} Total Allocation).");
|
||||
|
||||
_cacheAllocator = new CacheMemoryAllocator(CacheSize);
|
||||
|
||||
|
||||
@@ -166,7 +166,7 @@ namespace Ryujinx.Cpu.LightningJit.Cache
|
||||
|
||||
int newRegionNumber = _activeRegionIndex;
|
||||
|
||||
Logger.Warning?.Print(LogClass.Cpu, $"JIT Cache Region {exhaustedRegion} exhausted, creating new Cache Region {newRegionNumber} ({((long)(newRegionNumber + 1) * CacheSize).Bytes()} Total Allocation).");
|
||||
Logger.Warning?.Print(LogClass.Cpu, $"JIT Cache Region {exhaustedRegion} exhausted, creating new Cache Region {newRegionNumber} ({((newRegionNumber + 1) * CacheSize).Bytes()} Total Allocation).");
|
||||
|
||||
_cacheAllocator = new CacheMemoryAllocator(CacheSize);
|
||||
|
||||
|
||||
@@ -110,24 +110,10 @@ namespace Ryujinx.HLE.HOS.Services.Ldn.UserServiceCreator.LdnRyu.Proxy
|
||||
_broadcastAddress = config.ProxyIp | (~config.ProxySubnetMask);
|
||||
}
|
||||
|
||||
public async Task<ushort> NatPunch()
|
||||
private async Task<ushort> NatPunchForDevice(NatDevice device)
|
||||
{
|
||||
NatDiscoverer discoverer = new();
|
||||
CancellationTokenSource cts = new(5000);
|
||||
|
||||
NatDevice device;
|
||||
|
||||
try
|
||||
{
|
||||
device = await discoverer.DiscoverDeviceAsync(PortMapper.Upnp, cts);
|
||||
}
|
||||
catch (NatDeviceNotFoundException)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
Logger.Info?.PrintMsg(LogClass.ServiceLdn, $"Attempting to map port using {device.ToString()}");
|
||||
_publicPort = PublicPortBase;
|
||||
|
||||
for (int i = 0; i < PublicPortRange; i++)
|
||||
{
|
||||
try
|
||||
@@ -138,12 +124,14 @@ namespace Ryujinx.HLE.HOS.Services.Ldn.UserServiceCreator.LdnRyu.Proxy
|
||||
|
||||
break;
|
||||
}
|
||||
catch (MappingException)
|
||||
catch (MappingException ex)
|
||||
{
|
||||
Logger.Info?.PrintMsg(LogClass.ServiceLdn, $"Failed to map port {_publicPort}: {ex.Message}");
|
||||
_publicPort++;
|
||||
}
|
||||
catch (Exception)
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.Info?.PrintMsg(LogClass.ServiceLdn, $"Failed to map port {_publicPort}: {ex.GetType().Name}: {ex.Message}");
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -155,17 +143,52 @@ namespace Ryujinx.HLE.HOS.Services.Ldn.UserServiceCreator.LdnRyu.Proxy
|
||||
|
||||
if (_publicPort != 0)
|
||||
{
|
||||
_natDevice = device;
|
||||
_ = Executor.ExecuteAfterDelayAsync(
|
||||
PortLeaseRenew.Seconds(),
|
||||
PortLeaseRenew.Seconds(),
|
||||
_disposedCancellation.Token,
|
||||
RefreshLease);
|
||||
}
|
||||
|
||||
_natDevice = device;
|
||||
|
||||
return _publicPort;
|
||||
}
|
||||
|
||||
public async Task<ushort> NatPunch()
|
||||
{
|
||||
NatDiscoverer discoverer = new();
|
||||
CancellationTokenSource cts = new(500);
|
||||
|
||||
NatDevice[] devices;
|
||||
|
||||
try
|
||||
{
|
||||
devices = (await discoverer.DiscoverDevicesAsync(PortMapper.Upnp, cts)).ToArray();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.Error?.PrintMsg(LogClass.ServiceLdn, $"Failed to discover UPnP devices: {ex.Message}");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (devices.Length == 0)
|
||||
{
|
||||
Logger.Error?.PrintMsg(LogClass.ServiceLdn, "No UPnP devices found.");
|
||||
return 0;
|
||||
}
|
||||
|
||||
foreach (var device in devices)
|
||||
{
|
||||
ushort port = await NatPunchForDevice(device);
|
||||
if (port != 0)
|
||||
{
|
||||
return port;
|
||||
}
|
||||
}
|
||||
Logger.Info?.PrintMsg(LogClass.ServiceLdn, $"Failed to map port using any device");
|
||||
_publicPort = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Proxy handlers
|
||||
|
||||
private void RouteMessage(P2pProxySession sender, ref ProxyInfo info, Action<P2pProxySession> action)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user