mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-08-03 00:27:11 +02:00
Fix GetAddrInfoWithOptions and some sockets issues (#2936)
* Fix GetAddrInfoWithOptions and some sockets issues * Was not supposed to remove this log
This commit is contained in:
parent
c0056546e7
commit
0b1185284c
14 changed files with 237 additions and 108 deletions
|
@ -14,8 +14,11 @@ namespace Ryujinx.Configuration
|
|||
/// <summary>
|
||||
/// The current version of the file format
|
||||
/// </summary>
|
||||
public const int CurrentVersion = 33;
|
||||
public const int CurrentVersion = 34;
|
||||
|
||||
/// <summary>
|
||||
/// Version of the configuration file format
|
||||
/// </summary>
|
||||
public int Version { get; set; }
|
||||
|
||||
/// <summary>
|
||||
|
@ -98,7 +101,6 @@ namespace Ryujinx.Configuration
|
|||
/// </summary>
|
||||
public GraphicsDebugLevel LoggingGraphicsDebugLevel { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Change System Language
|
||||
/// </summary>
|
||||
|
@ -154,16 +156,16 @@ namespace Ryujinx.Configuration
|
|||
/// </summary>
|
||||
public bool EnableShaderCache { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Enables or disables multi-core scheduling of threads
|
||||
/// </summary>
|
||||
public bool EnableMulticoreScheduling { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Enables or disables profiled translation cache persistency
|
||||
/// </summary>
|
||||
public bool EnablePtc { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Enables or disables guest Internet access
|
||||
/// </summary>
|
||||
public bool EnableInternetAccess { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Enables integrity checks on Game content files
|
||||
/// </summary>
|
||||
|
|
|
@ -205,6 +205,11 @@ namespace Ryujinx.Configuration
|
|||
/// </summary>
|
||||
public ReactiveObject<bool> EnablePtc { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Enables or disables guest Internet access
|
||||
/// </summary>
|
||||
public ReactiveObject<bool> EnableInternetAccess { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Enables integrity checks on Game content files
|
||||
/// </summary>
|
||||
|
@ -250,6 +255,8 @@ namespace Ryujinx.Configuration
|
|||
EnableDockedMode.Event += static (sender, e) => LogValueChange(sender, e, nameof(EnableDockedMode));
|
||||
EnablePtc = new ReactiveObject<bool>();
|
||||
EnablePtc.Event += static (sender, e) => LogValueChange(sender, e, nameof(EnablePtc));
|
||||
EnableInternetAccess = new ReactiveObject<bool>();
|
||||
EnableInternetAccess.Event += static (sender, e) => LogValueChange(sender, e, nameof(EnableInternetAccess));
|
||||
EnableFsIntegrityChecks = new ReactiveObject<bool>();
|
||||
EnableFsIntegrityChecks.Event += static (sender, e) => LogValueChange(sender, e, nameof(EnableFsIntegrityChecks));
|
||||
FsGlobalAccessLogMode = new ReactiveObject<int>();
|
||||
|
@ -276,7 +283,7 @@ namespace Ryujinx.Configuration
|
|||
/// Enable or disable keyboard support (Independent from controllers binding)
|
||||
/// </summary>
|
||||
public ReactiveObject<bool> EnableKeyboard { get; private set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Enable or disable mouse support (Independent from controllers binding)
|
||||
/// </summary>
|
||||
|
@ -464,6 +471,7 @@ namespace Ryujinx.Configuration
|
|||
EnableVsync = Graphics.EnableVsync,
|
||||
EnableShaderCache = Graphics.EnableShaderCache,
|
||||
EnablePtc = System.EnablePtc,
|
||||
EnableInternetAccess = System.EnableInternetAccess,
|
||||
EnableFsIntegrityChecks = System.EnableFsIntegrityChecks,
|
||||
FsGlobalAccessLogMode = System.FsGlobalAccessLogMode,
|
||||
AudioBackend = System.AudioBackend,
|
||||
|
@ -534,6 +542,7 @@ namespace Ryujinx.Configuration
|
|||
Graphics.EnableVsync.Value = true;
|
||||
Graphics.EnableShaderCache.Value = true;
|
||||
System.EnablePtc.Value = true;
|
||||
System.EnableInternetAccess.Value = false;
|
||||
System.EnableFsIntegrityChecks.Value = true;
|
||||
System.FsGlobalAccessLogMode.Value = 0;
|
||||
System.AudioBackend.Value = AudioBackend.SDL2;
|
||||
|
@ -956,6 +965,15 @@ namespace Ryujinx.Configuration
|
|||
configurationFileUpdated = true;
|
||||
}
|
||||
|
||||
if (configurationFileFormat.Version < 34)
|
||||
{
|
||||
Common.Logging.Logger.Warning?.Print(LogClass.Application, $"Outdated configuration version {configurationFileFormat.Version}, migrating to version 34.");
|
||||
|
||||
configurationFileFormat.EnableInternetAccess = false;
|
||||
|
||||
configurationFileUpdated = true;
|
||||
}
|
||||
|
||||
Logger.EnableFileLog.Value = configurationFileFormat.EnableFileLog;
|
||||
Graphics.BackendThreading.Value = configurationFileFormat.BackendThreading;
|
||||
Graphics.ResScale.Value = configurationFileFormat.ResScale;
|
||||
|
@ -984,6 +1002,7 @@ namespace Ryujinx.Configuration
|
|||
Graphics.EnableVsync.Value = configurationFileFormat.EnableVsync;
|
||||
Graphics.EnableShaderCache.Value = configurationFileFormat.EnableShaderCache;
|
||||
System.EnablePtc.Value = configurationFileFormat.EnablePtc;
|
||||
System.EnableInternetAccess.Value = configurationFileFormat.EnableInternetAccess;
|
||||
System.EnableFsIntegrityChecks.Value = configurationFileFormat.EnableFsIntegrityChecks;
|
||||
System.FsGlobalAccessLogMode.Value = configurationFileFormat.FsGlobalAccessLogMode;
|
||||
System.AudioBackend.Value = configurationFileFormat.AudioBackend;
|
||||
|
|
|
@ -206,7 +206,7 @@ namespace Ryujinx.Ui
|
|||
ConfigurationState.Instance.System.IgnoreMissingServices.Event += UpdateIgnoreMissingServicesState;
|
||||
ConfigurationState.Instance.Graphics.AspectRatio.Event += UpdateAspectRatioState;
|
||||
ConfigurationState.Instance.System.EnableDockedMode.Event += UpdateDockedModeState;
|
||||
ConfigurationState.Instance.System.AudioVolume.Event += UpdateAudioVolumeState;
|
||||
ConfigurationState.Instance.System.AudioVolume.Event += UpdateAudioVolumeState;
|
||||
|
||||
if (ConfigurationState.Instance.Ui.StartFullscreen)
|
||||
{
|
||||
|
@ -434,7 +434,7 @@ namespace Ryujinx.Ui
|
|||
else
|
||||
{
|
||||
Logger.Warning?.Print(LogClass.Audio, "SDL2 is not supported, trying to fall back to OpenAL.");
|
||||
|
||||
|
||||
if (OpenALHardwareDeviceDriver.IsSupported)
|
||||
{
|
||||
Logger.Warning?.Print(LogClass.Audio, "Found OpenAL, changing configuration.");
|
||||
|
@ -447,7 +447,7 @@ namespace Ryujinx.Ui
|
|||
else
|
||||
{
|
||||
Logger.Warning?.Print(LogClass.Audio, "OpenAL is not supported, trying to fall back to SoundIO.");
|
||||
|
||||
|
||||
if (SoundIoHardwareDeviceDriver.IsSupported)
|
||||
{
|
||||
Logger.Warning?.Print(LogClass.Audio, "Found SoundIO, changing configuration.");
|
||||
|
@ -460,8 +460,8 @@ namespace Ryujinx.Ui
|
|||
else
|
||||
{
|
||||
Logger.Warning?.Print(LogClass.Audio, "SoundIO is not supported, falling back to dummy audio out.");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (ConfigurationState.Instance.System.AudioBackend.Value == AudioBackend.SoundIo)
|
||||
|
@ -499,7 +499,7 @@ namespace Ryujinx.Ui
|
|||
else
|
||||
{
|
||||
Logger.Warning?.Print(LogClass.Audio, "OpenAL is not supported, falling back to dummy audio out.");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -525,7 +525,7 @@ namespace Ryujinx.Ui
|
|||
else
|
||||
{
|
||||
Logger.Warning?.Print(LogClass.Audio, "SDL2 is not supported, trying to fall back to SoundIO.");
|
||||
|
||||
|
||||
if (SoundIoHardwareDeviceDriver.IsSupported)
|
||||
{
|
||||
Logger.Warning?.Print(LogClass.Audio, "Found SoundIO, changing configuration.");
|
||||
|
@ -563,6 +563,7 @@ namespace Ryujinx.Ui
|
|||
ConfigurationState.Instance.Graphics.EnableVsync,
|
||||
ConfigurationState.Instance.System.EnableDockedMode,
|
||||
ConfigurationState.Instance.System.EnablePtc,
|
||||
ConfigurationState.Instance.System.EnableInternetAccess,
|
||||
fsIntegrityCheckLevel,
|
||||
ConfigurationState.Instance.System.FsGlobalAccessLogMode,
|
||||
ConfigurationState.Instance.System.SystemTimeOffset,
|
||||
|
|
|
@ -52,6 +52,7 @@ namespace Ryujinx.Ui.Windows
|
|||
[GUI] CheckButton _vSyncToggle;
|
||||
[GUI] CheckButton _shaderCacheToggle;
|
||||
[GUI] CheckButton _ptcToggle;
|
||||
[GUI] CheckButton _internetToggle;
|
||||
[GUI] CheckButton _fsicToggle;
|
||||
[GUI] RadioButton _mmSoftware;
|
||||
[GUI] RadioButton _mmHost;
|
||||
|
@ -226,6 +227,11 @@ namespace Ryujinx.Ui.Windows
|
|||
_ptcToggle.Click();
|
||||
}
|
||||
|
||||
if (ConfigurationState.Instance.System.EnableInternetAccess)
|
||||
{
|
||||
_internetToggle.Click();
|
||||
}
|
||||
|
||||
if (ConfigurationState.Instance.System.EnableFsIntegrityChecks)
|
||||
{
|
||||
_fsicToggle.Click();
|
||||
|
@ -496,6 +502,7 @@ namespace Ryujinx.Ui.Windows
|
|||
ConfigurationState.Instance.Graphics.EnableVsync.Value = _vSyncToggle.Active;
|
||||
ConfigurationState.Instance.Graphics.EnableShaderCache.Value = _shaderCacheToggle.Active;
|
||||
ConfigurationState.Instance.System.EnablePtc.Value = _ptcToggle.Active;
|
||||
ConfigurationState.Instance.System.EnableInternetAccess.Value = _internetToggle.Active;
|
||||
ConfigurationState.Instance.System.EnableFsIntegrityChecks.Value = _fsicToggle.Active;
|
||||
ConfigurationState.Instance.System.MemoryManagerMode.Value = memoryMode;
|
||||
ConfigurationState.Instance.System.ExpandRam.Value = _expandRamToggle.Active;
|
||||
|
|
|
@ -1507,6 +1507,24 @@
|
|||
<property name="position">6</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="_internetToggle">
|
||||
<property name="label" translatable="yes">Enable guest Internet access</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="receives-default">False</property>
|
||||
<property name="tooltip-text" translatable="yes">Enables guest Internet access. If enabled, the application will behave as if the emulated Switch console was connected to the Internet. Note that in some cases, applications may still access the Internet even with this option disabled</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="margin-top">5</property>
|
||||
<property name="margin-bottom">5</property>
|
||||
<property name="draw-indicator">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">7</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="_fsicToggle">
|
||||
<property name="label" translatable="yes">Enable FS Integrity Checks</property>
|
||||
|
@ -1522,7 +1540,7 @@
|
|||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">7</property>
|
||||
<property name="position">8</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue