diff options
| author | Alex Barney <thealexbarney@gmail.com> | 2019-07-01 21:39:22 -0500 |
|---|---|---|
| committer | Ac_K <Acoustik666@gmail.com> | 2019-07-02 04:39:22 +0200 |
| commit | b2b736abc2569ab5d8199da666aef8d8394844a0 (patch) | |
| tree | 88bcc2ae4fb0d4161c95df2cd7edb12388de922a /Ryujinx.HLE/HOS/Services | |
| parent | 10c74182babaf8cf6bedaeffd64c3109df4ea816 (diff) | |
Misc cleanup (#708)
* Fix typos
* Remove unneeded using statements
* Enforce var style more
* Remove redundant qualifiers
* Fix some indentation
* Disable naming warnings on files with external enum names
* Fix build
* Mass find & replace for comments with no spacing
* Standardize todo capitalization and for/if spacing
Diffstat (limited to 'Ryujinx.HLE/HOS/Services')
47 files changed, 83 insertions, 87 deletions
diff --git a/Ryujinx.HLE/HOS/Services/Am/IApplicationCreator.cs b/Ryujinx.HLE/HOS/Services/Am/IApplicationCreator.cs index eac609ed..5f31b323 100644 --- a/Ryujinx.HLE/HOS/Services/Am/IApplicationCreator.cs +++ b/Ryujinx.HLE/HOS/Services/Am/IApplicationCreator.cs @@ -13,7 +13,7 @@ namespace Ryujinx.HLE.HOS.Services.Am { _commands = new Dictionary<int, ServiceProcessRequest> { - //... + // ... }; } } diff --git a/Ryujinx.HLE/HOS/Services/Am/IApplicationFunctions.cs b/Ryujinx.HLE/HOS/Services/Am/IApplicationFunctions.cs index 41bfb1c8..dc8adb93 100644 --- a/Ryujinx.HLE/HOS/Services/Am/IApplicationFunctions.cs +++ b/Ryujinx.HLE/HOS/Services/Am/IApplicationFunctions.cs @@ -28,7 +28,7 @@ namespace Ryujinx.HLE.HOS.Services.Am public long PopLaunchParameter(ServiceCtx context) { - //Only the first 0x18 bytes of the Data seems to be actually used. + // Only the first 0x18 bytes of the Data seems to be actually used. MakeObject(context, new IStorage(StorageHelper.MakeLaunchParams())); return 0; @@ -74,7 +74,7 @@ namespace Ryujinx.HLE.HOS.Services.Am public long GetDisplayVersion(ServiceCtx context) { - //FIXME: Need to check correct version on a switch. + // FIXME: Need to check correct version on a switch. context.ResponseData.Write(1L); context.ResponseData.Write(0L); diff --git a/Ryujinx.HLE/HOS/Services/Am/IDebugFunctions.cs b/Ryujinx.HLE/HOS/Services/Am/IDebugFunctions.cs index f7ea253d..a884a454 100644 --- a/Ryujinx.HLE/HOS/Services/Am/IDebugFunctions.cs +++ b/Ryujinx.HLE/HOS/Services/Am/IDebugFunctions.cs @@ -13,7 +13,7 @@ namespace Ryujinx.HLE.HOS.Services.Am { _commands = new Dictionary<int, ServiceProcessRequest> { - //... + // ... }; } } diff --git a/Ryujinx.HLE/HOS/Services/Am/IDisplayController.cs b/Ryujinx.HLE/HOS/Services/Am/IDisplayController.cs index 91fd864c..fc668f3c 100644 --- a/Ryujinx.HLE/HOS/Services/Am/IDisplayController.cs +++ b/Ryujinx.HLE/HOS/Services/Am/IDisplayController.cs @@ -13,7 +13,7 @@ namespace Ryujinx.HLE.HOS.Services.Am { _commands = new Dictionary<int, ServiceProcessRequest> { - //... + // ... }; } } diff --git a/Ryujinx.HLE/HOS/Services/Am/IGlobalStateController.cs b/Ryujinx.HLE/HOS/Services/Am/IGlobalStateController.cs index b9387661..634f65eb 100644 --- a/Ryujinx.HLE/HOS/Services/Am/IGlobalStateController.cs +++ b/Ryujinx.HLE/HOS/Services/Am/IGlobalStateController.cs @@ -13,7 +13,7 @@ namespace Ryujinx.HLE.HOS.Services.Am { _commands = new Dictionary<int, ServiceProcessRequest> { - //... + // ... }; } } diff --git a/Ryujinx.HLE/HOS/Services/Am/IHomeMenuFunctions.cs b/Ryujinx.HLE/HOS/Services/Am/IHomeMenuFunctions.cs index e61fccb2..868e0215 100644 --- a/Ryujinx.HLE/HOS/Services/Am/IHomeMenuFunctions.cs +++ b/Ryujinx.HLE/HOS/Services/Am/IHomeMenuFunctions.cs @@ -23,7 +23,7 @@ namespace Ryujinx.HLE.HOS.Services.Am { 21, GetPopFromGeneralChannelEvent } }; - //ToDo: Signal this Event somewhere in future. + // TODO: Signal this Event somewhere in future. _channelEvent = new KEvent(system); } diff --git a/Ryujinx.HLE/HOS/Services/Am/IStorageAccessor.cs b/Ryujinx.HLE/HOS/Services/Am/IStorageAccessor.cs index ac54069a..ac44e444 100644 --- a/Ryujinx.HLE/HOS/Services/Am/IStorageAccessor.cs +++ b/Ryujinx.HLE/HOS/Services/Am/IStorageAccessor.cs @@ -33,7 +33,7 @@ namespace Ryujinx.HLE.HOS.Services.Am public long Write(ServiceCtx context) { - //TODO: Error conditions. + // TODO: Error conditions. long writePosition = context.RequestData.ReadInt64(); (long position, long size) = context.Request.GetBufferType0x21(); @@ -57,7 +57,7 @@ namespace Ryujinx.HLE.HOS.Services.Am public long Read(ServiceCtx context) { - //TODO: Error conditions. + // TODO: Error conditions. long readPosition = context.RequestData.ReadInt64(); (long position, long size) = context.Request.GetBufferType0x22(); diff --git a/Ryujinx.HLE/HOS/Services/Am/StorageHelper.cs b/Ryujinx.HLE/HOS/Services/Am/StorageHelper.cs index 39a4c6dd..a3dbbeb7 100644 --- a/Ryujinx.HLE/HOS/Services/Am/StorageHelper.cs +++ b/Ryujinx.HLE/HOS/Services/Am/StorageHelper.cs @@ -8,7 +8,7 @@ namespace Ryujinx.HLE.HOS.Services.Am public static byte[] MakeLaunchParams() { - //Size needs to be at least 0x88 bytes otherwise application errors. + // Size needs to be at least 0x88 bytes otherwise application errors. using (MemoryStream ms = new MemoryStream()) { BinaryWriter writer = new BinaryWriter(ms); diff --git a/Ryujinx.HLE/HOS/Services/Aud/AudioRenderer/IAudioRenderer.cs b/Ryujinx.HLE/HOS/Services/Aud/AudioRenderer/IAudioRenderer.cs index 8c984385..2fbb041a 100644 --- a/Ryujinx.HLE/HOS/Services/Aud/AudioRenderer/IAudioRenderer.cs +++ b/Ryujinx.HLE/HOS/Services/Aud/AudioRenderer/IAudioRenderer.cs @@ -16,11 +16,11 @@ namespace Ryujinx.HLE.HOS.Services.Aud.AudioRenderer { class IAudioRenderer : IpcService, IDisposable { - //This is the amount of samples that are going to be appended - //each time that RequestUpdateAudioRenderer is called. Ideally, - //this value shouldn't be neither too small (to avoid the player - //starving due to running out of samples) or too large (to avoid - //high latency). + // This is the amount of samples that are going to be appended + // each time that RequestUpdateAudioRenderer is called. Ideally, + // this value shouldn't be neither too small (to avoid the player + // starving due to running out of samples) or too large (to avoid + // high latency). private const int MixBufferSamplesCount = 960; private Dictionary<int, ServiceProcessRequest> _commands; diff --git a/Ryujinx.HLE/HOS/Services/Aud/AudioRenderer/VoiceChannelResourceIn.cs b/Ryujinx.HLE/HOS/Services/Aud/AudioRenderer/VoiceChannelResourceIn.cs index 2a6f424f..4933a79b 100644 --- a/Ryujinx.HLE/HOS/Services/Aud/AudioRenderer/VoiceChannelResourceIn.cs +++ b/Ryujinx.HLE/HOS/Services/Aud/AudioRenderer/VoiceChannelResourceIn.cs @@ -5,6 +5,6 @@ namespace Ryujinx.HLE.HOS.Services.Aud.AudioRenderer [StructLayout(LayoutKind.Sequential, Size = 0x70, Pack = 1)] struct VoiceChannelResourceIn { - //??? + // ??? } } diff --git a/Ryujinx.HLE/HOS/Services/Aud/AudioRenderer/VoiceContext.cs b/Ryujinx.HLE/HOS/Services/Aud/AudioRenderer/VoiceContext.cs index 5de85612..971563dc 100644 --- a/Ryujinx.HLE/HOS/Services/Aud/AudioRenderer/VoiceContext.cs +++ b/Ryujinx.HLE/HOS/Services/Aud/AudioRenderer/VoiceContext.cs @@ -46,7 +46,7 @@ namespace Ryujinx.HLE.HOS.Services.Aud.AudioRenderer { if (_acquired && !newState) { - //Release. + // Release. Reset(); } @@ -124,9 +124,9 @@ namespace Ryujinx.HLE.HOS.Services.Aud.AudioRenderer private void UpdateBuffer(MemoryManager memory) { - //TODO: Implement conversion for formats other - //than interleaved stereo (2 channels). - //As of now, it assumes that HostChannelsCount == 2. + // TODO: Implement conversion for formats other + // than interleaved stereo (2 channels). + // As of now, it assumes that HostChannelsCount == 2. WaveBuffer wb = WaveBuffers[_bufferIndex]; if (wb.Position == 0) @@ -173,9 +173,9 @@ namespace Ryujinx.HLE.HOS.Services.Aud.AudioRenderer if (SampleRate != AudioConsts.HostSampleRate) { - //TODO: We should keep the frames being discarded (see the 4 below) - //on a buffer and include it on the next samples buffer, to allow - //the resampler to do seamless interpolation between wave buffers. + // TODO: We should keep the frames being discarded (see the 4 below) + // on a buffer and include it on the next samples buffer, to allow + // the resampler to do seamless interpolation between wave buffers. int samplesCount = _samples.Length / AudioConsts.HostChannelsCount; samplesCount = Math.Max(samplesCount - 4, 0); diff --git a/Ryujinx.HLE/HOS/Services/Aud/IAudioDevice.cs b/Ryujinx.HLE/HOS/Services/Aud/IAudioDevice.cs index 4be183fa..d4946999 100644 --- a/Ryujinx.HLE/HOS/Services/Aud/IAudioDevice.cs +++ b/Ryujinx.HLE/HOS/Services/Aud/IAudioDevice.cs @@ -36,7 +36,7 @@ namespace Ryujinx.HLE.HOS.Services.Aud _systemEvent = new KEvent(system); - //TODO: We shouldn't be signaling this here. + // TODO: We shouldn't be signaling this here. _systemEvent.ReadableEvent.Signal(); } diff --git a/Ryujinx.HLE/HOS/Services/Aud/IHardwareOpusDecoder.cs b/Ryujinx.HLE/HOS/Services/Aud/IHardwareOpusDecoder.cs index fc0bd8db..68b02bcc 100644 --- a/Ryujinx.HLE/HOS/Services/Aud/IHardwareOpusDecoder.cs +++ b/Ryujinx.HLE/HOS/Services/Aud/IHardwareOpusDecoder.cs @@ -37,8 +37,8 @@ namespace Ryujinx.HLE.HOS.Services.Aud { long result = DecodeInterleaved(context); - //TODO: Figure out what this value is. - //According to switchbrew, it is now used. + // TODO: Figure out what this value is. + // According to switchbrew, it is now used. context.ResponseData.Write(0L); return result; diff --git a/Ryujinx.HLE/HOS/Services/Aud/IHardwareOpusDecoderManager.cs b/Ryujinx.HLE/HOS/Services/Aud/IHardwareOpusDecoderManager.cs index 495c8ab4..0b5e12f0 100644 --- a/Ryujinx.HLE/HOS/Services/Aud/IHardwareOpusDecoderManager.cs +++ b/Ryujinx.HLE/HOS/Services/Aud/IHardwareOpusDecoderManager.cs @@ -30,7 +30,7 @@ namespace Ryujinx.HLE.HOS.Services.Aud public long GetWorkBufferSize(ServiceCtx context) { - //Note: The sample rate is ignored because it is fixed to 48KHz. + // Note: The sample rate is ignored because it is fixed to 48KHz. int sampleRate = context.RequestData.ReadInt32(); int channelsCount = context.RequestData.ReadInt32(); diff --git a/Ryujinx.HLE/HOS/Services/Bcat/IBcatService.cs b/Ryujinx.HLE/HOS/Services/Bcat/IBcatService.cs index 051b75d6..dfd67304 100644 --- a/Ryujinx.HLE/HOS/Services/Bcat/IBcatService.cs +++ b/Ryujinx.HLE/HOS/Services/Bcat/IBcatService.cs @@ -13,7 +13,7 @@ namespace Ryujinx.HLE.HOS.Services.Bcat { _commands = new Dictionary<int, ServiceProcessRequest> { - //... + // ... }; } diff --git a/Ryujinx.HLE/HOS/Services/Bcat/IDeliveryCacheStorageService.cs b/Ryujinx.HLE/HOS/Services/Bcat/IDeliveryCacheStorageService.cs index 043cb607..fcf81c7e 100644 --- a/Ryujinx.HLE/HOS/Services/Bcat/IDeliveryCacheStorageService.cs +++ b/Ryujinx.HLE/HOS/Services/Bcat/IDeliveryCacheStorageService.cs @@ -13,7 +13,7 @@ namespace Ryujinx.HLE.HOS.Services.Bcat { _commands = new Dictionary<int, ServiceProcessRequest> { - //... + // ... }; } diff --git a/Ryujinx.HLE/HOS/Services/Caps/IAlbumAccessorService.cs b/Ryujinx.HLE/HOS/Services/Caps/IAlbumAccessorService.cs index 7b334ac4..82da2451 100644 --- a/Ryujinx.HLE/HOS/Services/Caps/IAlbumAccessorService.cs +++ b/Ryujinx.HLE/HOS/Services/Caps/IAlbumAccessorService.cs @@ -13,7 +13,7 @@ namespace Ryujinx.HLE.HOS.Services.Caps { _commands = new Dictionary<int, ServiceProcessRequest> { - //... + // ... }; } } diff --git a/Ryujinx.HLE/HOS/Services/Caps/IScreenshotService.cs b/Ryujinx.HLE/HOS/Services/Caps/IScreenshotService.cs index 63b155e0..9273b394 100644 --- a/Ryujinx.HLE/HOS/Services/Caps/IScreenshotService.cs +++ b/Ryujinx.HLE/HOS/Services/Caps/IScreenshotService.cs @@ -13,7 +13,7 @@ namespace Ryujinx.HLE.HOS.Services.Caps { _commands = new Dictionary<int, ServiceProcessRequest> { - //... + // ... }; } } diff --git a/Ryujinx.HLE/HOS/Services/Friend/IDaemonSuspendSessionService.cs b/Ryujinx.HLE/HOS/Services/Friend/IDaemonSuspendSessionService.cs index d0edf29e..b1f23dd5 100644 --- a/Ryujinx.HLE/HOS/Services/Friend/IDaemonSuspendSessionService.cs +++ b/Ryujinx.HLE/HOS/Services/Friend/IDaemonSuspendSessionService.cs @@ -13,7 +13,7 @@ namespace Ryujinx.HLE.HOS.Services.Friend { _commands = new Dictionary<int, ServiceProcessRequest> { - //... + // ... }; } } diff --git a/Ryujinx.HLE/HOS/Services/Friend/IFriendService.cs b/Ryujinx.HLE/HOS/Services/Friend/IFriendService.cs index 17a32b00..35f40818 100644 --- a/Ryujinx.HLE/HOS/Services/Friend/IFriendService.cs +++ b/Ryujinx.HLE/HOS/Services/Friend/IFriendService.cs @@ -108,7 +108,7 @@ namespace Ryujinx.HLE.HOS.Services.Friend long position = context.Request.PtrBuff[0].Position; long size = context.Request.PtrBuff[0].Size; - //Todo: Write the buffer content. + // TODO: Write the buffer content. Logger.PrintStub(LogClass.ServiceFriend, new { UserId = uuid.ToString(), unknown0 }); diff --git a/Ryujinx.HLE/HOS/Services/FspSrv/IFile.cs b/Ryujinx.HLE/HOS/Services/FspSrv/IFile.cs index 0b8b31fb..48239940 100644 --- a/Ryujinx.HLE/HOS/Services/FspSrv/IFile.cs +++ b/Ryujinx.HLE/HOS/Services/FspSrv/IFile.cs @@ -29,7 +29,7 @@ namespace Ryujinx.HLE.HOS.Services.FspSrv }; _baseFile = baseFile; - Path = LibHac.Fs.PathTools.Normalize(path); + Path = PathTools.Normalize(path); } // Read(u32 readOption, u64 offset, u64 size) -> (u64 out_size, buffer<u8, 0x46, 0> out_buf) diff --git a/Ryujinx.HLE/HOS/Services/FspSrv/IFileSystem.cs b/Ryujinx.HLE/HOS/Services/FspSrv/IFileSystem.cs index 74ba6216..01a8dc9b 100644 --- a/Ryujinx.HLE/HOS/Services/FspSrv/IFileSystem.cs +++ b/Ryujinx.HLE/HOS/Services/FspSrv/IFileSystem.cs @@ -306,7 +306,7 @@ namespace Ryujinx.HLE.HOS.Services.FspSrv try { - LibHac.Fs.DirectoryEntryType entryType = _provider.GetEntryType(name); + DirectoryEntryType entryType = _provider.GetEntryType(name); context.ResponseData.Write((int)entryType); } diff --git a/Ryujinx.HLE/HOS/Services/FspSrv/IFileSystemProxy.cs b/Ryujinx.HLE/HOS/Services/FspSrv/IFileSystemProxy.cs index 23989365..7207aaf0 100644 --- a/Ryujinx.HLE/HOS/Services/FspSrv/IFileSystemProxy.cs +++ b/Ryujinx.HLE/HOS/Services/FspSrv/IFileSystemProxy.cs @@ -312,7 +312,7 @@ namespace Ryujinx.HLE.HOS.Services.FspSrv private void ImportTitleKeysFromNsp(LibHac.Fs.IFileSystem nsp, Keyset keySet) { - foreach (LibHac.Fs.DirectoryEntry ticketEntry in nsp.EnumerateEntries("*.tik")) + foreach (DirectoryEntry ticketEntry in nsp.EnumerateEntries("*.tik")) { Ticket ticket = new Ticket(nsp.OpenFile(ticketEntry.FullPath, OpenMode.Read).AsStream()); diff --git a/Ryujinx.HLE/HOS/Services/FspSrv/IStorage.cs b/Ryujinx.HLE/HOS/Services/FspSrv/IStorage.cs index 75f2c9ee..81bdcdcc 100644 --- a/Ryujinx.HLE/HOS/Services/FspSrv/IStorage.cs +++ b/Ryujinx.HLE/HOS/Services/FspSrv/IStorage.cs @@ -32,7 +32,7 @@ namespace Ryujinx.HLE.HOS.Services.FspSrv { IpcBuffDesc buffDesc = context.Request.ReceiveBuff[0]; - //Use smaller length to avoid overflows. + // Use smaller length to avoid overflows. if (size > buffDesc.Size) { size = buffDesc.Size; diff --git a/Ryujinx.HLE/HOS/Services/Hid/IHidServer.cs b/Ryujinx.HLE/HOS/Services/Hid/IHidServer.cs index e5b56a60..7e48a186 100644 --- a/Ryujinx.HLE/HOS/Services/Hid/IHidServer.cs +++ b/Ryujinx.HLE/HOS/Services/Hid/IHidServer.cs @@ -1014,7 +1014,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid context.Request.PtrBuff[1].Position, context.Request.PtrBuff[1].Size); - //Todo: Read all handles and values from buffer. + // TODO: Read all handles and values from buffer. Logger.PrintStub(LogClass.ServiceHid, new { appletResourceUserId, @@ -1137,7 +1137,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid long counter0 = context.RequestData.ReadInt64(); long counter1 = context.RequestData.ReadInt64(); - // Todo: Determine if array<nn::sf::NativeHandle> is a buffer or not... + // TODO: Determine if array<nn::sf::NativeHandle> is a buffer or not... Logger.PrintStub(LogClass.ServiceHid, new { appletResourceUserId, counter0, counter1 }); diff --git a/Ryujinx.HLE/HOS/Services/Ldr/IRoInterface.cs b/Ryujinx.HLE/HOS/Services/Ldr/IRoInterface.cs index 202e6df5..49edab59 100644 --- a/Ryujinx.HLE/HOS/Services/Ldr/IRoInterface.cs +++ b/Ryujinx.HLE/HOS/Services/Ldr/IRoInterface.cs @@ -523,7 +523,7 @@ namespace Ryujinx.HLE.HOS.Services.Ldr NrrInfo info; result = ParseNrr(out info, context, nrrAddress, nrrSize); - if(result == 0) + if (result == 0) { if (_nrrInfos.Count >= MaxNrr) { diff --git a/Ryujinx.HLE/HOS/Services/Ns/IAddOnContentManager.cs b/Ryujinx.HLE/HOS/Services/Ns/IAddOnContentManager.cs index 94c0e810..9139c9bf 100644 --- a/Ryujinx.HLE/HOS/Services/Ns/IAddOnContentManager.cs +++ b/Ryujinx.HLE/HOS/Services/Ns/IAddOnContentManager.cs @@ -32,8 +32,8 @@ namespace Ryujinx.HLE.HOS.Services.Ns { Logger.PrintStub(LogClass.ServiceNs); - //TODO: This is supposed to write a u32 array aswell. - //It's unknown what it contains. + // TODO: This is supposed to write a u32 array aswell. + // It's unknown what it contains. context.ResponseData.Write(0); return 0; diff --git a/Ryujinx.HLE/HOS/Services/Ns/IApplicationManagerInterface.cs b/Ryujinx.HLE/HOS/Services/Ns/IApplicationManagerInterface.cs index 88fdb792..8c0fa41a 100644 --- a/Ryujinx.HLE/HOS/Services/Ns/IApplicationManagerInterface.cs +++ b/Ryujinx.HLE/HOS/Services/Ns/IApplicationManagerInterface.cs @@ -1,5 +1,4 @@ using LibHac; -using Ryujinx.Common.Logging; using Ryujinx.HLE.HOS.Ipc; using System; using System.Collections.Generic; diff --git a/Ryujinx.HLE/HOS/Services/Ns/ISystemUpdateInterface.cs b/Ryujinx.HLE/HOS/Services/Ns/ISystemUpdateInterface.cs index 1b898561..5499e235 100644 --- a/Ryujinx.HLE/HOS/Services/Ns/ISystemUpdateInterface.cs +++ b/Ryujinx.HLE/HOS/Services/Ns/ISystemUpdateInterface.cs @@ -13,7 +13,7 @@ namespace Ryujinx.HLE.HOS.Services.Ns { _commands = new Dictionary<int, ServiceProcessRequest> { - //... + // ... }; } } diff --git a/Ryujinx.HLE/HOS/Services/Ns/IVulnerabilityManagerInterface.cs b/Ryujinx.HLE/HOS/Services/Ns/IVulnerabilityManagerInterface.cs index 922703ec..6b7c4193 100644 --- a/Ryujinx.HLE/HOS/Services/Ns/IVulnerabilityManagerInterface.cs +++ b/Ryujinx.HLE/HOS/Services/Ns/IVulnerabilityManagerInterface.cs @@ -13,7 +13,7 @@ namespace Ryujinx.HLE.HOS.Services.Ns { _commands = new Dictionary<int, ServiceProcessRequest> { - //... + // ... }; } } diff --git a/Ryujinx.HLE/HOS/Services/Nv/INvDrvServices.cs b/Ryujinx.HLE/HOS/Services/Nv/INvDrvServices.cs index e69cc17f..dcfaef78 100644 --- a/Ryujinx.HLE/HOS/Services/Nv/INvDrvServices.cs +++ b/Ryujinx.HLE/HOS/Services/Nv/INvDrvServices.cs @@ -93,7 +93,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv throw new NotImplementedException($"{fdData.Name} {cmd:x4}"); } - //TODO: Verify if the error codes needs to be translated. + // TODO: Verify if the error codes needs to be translated. context.ResponseData.Write(result); return 0; @@ -127,7 +127,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv int fd = context.RequestData.ReadInt32(); int eventId = context.RequestData.ReadInt32(); - //TODO: Use Fd/EventId, different channels have different events. + // TODO: Use Fd/EventId, different channels have different events. if (context.Process.HandleTable.GenerateHandle(_event.ReadableEvent, out int handle) != KernelResult.Success) { throw new InvalidOperationException("Out of handles!"); diff --git a/Ryujinx.HLE/HOS/Services/Nv/NvGpuAS/NvGpuASCtx.cs b/Ryujinx.HLE/HOS/Services/Nv/NvGpuAS/NvGpuASCtx.cs index 67b80e33..e3cdf2f8 100644 --- a/Ryujinx.HLE/HOS/Services/Nv/NvGpuAS/NvGpuASCtx.cs +++ b/Ryujinx.HLE/HOS/Services/Nv/NvGpuAS/NvGpuASCtx.cs @@ -50,25 +50,25 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvGpuAS { long mapEnd = position + size; - //Check if size is valid (0 is also not allowed). + // Check if size is valid (0 is also not allowed). if ((ulong)mapEnd <= (ulong)position) { return false; } - //Check if address is page aligned. + // Check if address is page aligned. if ((position & NvGpuVmm.PageMask) != 0) { return false; } - //Check if region is reserved. + // Check if region is reserved. if (BinarySearch(_reservations, position) == null) { return false; } - //Check for overlap with already mapped buffers. + // Check for overlap with already mapped buffers. Range map = BinarySearchLt(_maps, mapEnd); if (map != null && map.End > (ulong)position) diff --git a/Ryujinx.HLE/HOS/Services/Nv/NvGpuAS/NvGpuASIoctl.cs b/Ryujinx.HLE/HOS/Services/Nv/NvGpuAS/NvGpuASIoctl.cs index 57728382..3b96ed6b 100644 --- a/Ryujinx.HLE/HOS/Services/Nv/NvGpuAS/NvGpuASIoctl.cs +++ b/Ryujinx.HLE/HOS/Services/Nv/NvGpuAS/NvGpuASIoctl.cs @@ -64,8 +64,8 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvGpuAS lock (asCtx) { - //Note: When the fixed offset flag is not set, - //the Offset field holds the alignment size instead. + // Note: When the fixed offset flag is not set, + // the Offset field holds the alignment size instead. if ((args.Flags & FlagFixedOffset) != 0) { args.Offset = asCtx.Vmm.ReserveFixed(args.Offset, (long)size); @@ -218,8 +218,8 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvGpuAS lock (asCtx) { - //Note: When the fixed offset flag is not set, - //the Offset field holds the alignment size instead. + // Note: When the fixed offset flag is not set, + // the Offset field holds the alignment size instead. bool vaAllocated = (args.Flags & FlagFixedOffset) == 0; if (!vaAllocated) diff --git a/Ryujinx.HLE/HOS/Services/Nv/NvHostChannel/NvHostChannelIoctl.cs b/Ryujinx.HLE/HOS/Services/Nv/NvHostChannel/NvHostChannelIoctl.cs index a13f0fcb..c5f29636 100644 --- a/Ryujinx.HLE/HOS/Services/Nv/NvHostChannel/NvHostChannelIoctl.cs +++ b/Ryujinx.HLE/HOS/Services/Nv/NvHostChannel/NvHostChannelIoctl.cs @@ -69,14 +69,14 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvHostChannel context.Device.Gpu.PushCommandBuffer(vmm, cmdBufData); } - //TODO: Relocation, waitchecks, etc. + // TODO: Relocation, waitchecks, etc. return NvResult.Success; } private static int GetSyncpoint(ServiceCtx context) { - //TODO + // TODO long inputPosition = context.Request.GetBufferType0x21().Position; long outputPosition = context.Request.GetBufferType0x22().Position; diff --git a/Ryujinx.HLE/HOS/Services/Nv/NvHostCtrl/NvHostCtrlIoctl.cs b/Ryujinx.HLE/HOS/Services/Nv/NvHostCtrl/NvHostCtrlIoctl.cs index e05ea77c..35f1a949 100644 --- a/Ryujinx.HLE/HOS/Services/Nv/NvHostCtrl/NvHostCtrlIoctl.cs +++ b/Ryujinx.HLE/HOS/Services/Nv/NvHostCtrl/NvHostCtrlIoctl.cs @@ -208,8 +208,8 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvHostCtrl { syncpt.AddWaiter(args.Thresh, waitEvent); - //Note: Negative (> INT_MAX) timeouts aren't valid on .NET, - //in this case we just use the maximum timeout possible. + // Note: Negative (> INT_MAX) timeouts aren't valid on .NET, + // in this case we just use the maximum timeout possible. int timeout = args.Timeout; if (timeout < -1) diff --git a/Ryujinx.HLE/HOS/Services/Nv/NvMap/NvMapIoctl.cs b/Ryujinx.HLE/HOS/Services/Nv/NvMap/NvMapIoctl.cs index b1ae8307..72286662 100644 --- a/Ryujinx.HLE/HOS/Services/Nv/NvMap/NvMapIoctl.cs +++ b/Ryujinx.HLE/HOS/Services/Nv/NvMap/NvMapIoctl.cs @@ -128,9 +128,9 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvMap if (address == 0) { - //When the address is zero, we need to allocate - //our own backing memory for the NvMap. - //TODO: Is this allocation inside the transfer memory? + // When the address is zero, we need to allocate + // our own backing memory for the NvMap. + // TODO: Is this allocation inside the transfer memory? result = NvResult.OutOfMemory; } @@ -208,8 +208,8 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvMap case NvMapHandleParam.Kind: args.Result = map.Kind; break; case NvMapHandleParam.Compr: args.Result = 0; break; - //Note: Base is not supported and returns an error. - //Any other value also returns an error. + // Note: Base is not supported and returns an error. + // Any other value also returns an error. default: return NvResult.InvalidInput; } diff --git a/Ryujinx.HLE/HOS/Services/Pctl/IParentalControlService.cs b/Ryujinx.HLE/HOS/Services/Pctl/IParentalControlService.cs index 3e8ae81c..2a4a3bdd 100644 --- a/Ryujinx.HLE/HOS/Services/Pctl/IParentalControlService.cs +++ b/Ryujinx.HLE/HOS/Services/Pctl/IParentalControlService.cs @@ -1,6 +1,5 @@ using Ryujinx.Common.Logging; using Ryujinx.HLE.HOS.Ipc; -using System; using System.Collections.Generic; namespace Ryujinx.HLE.HOS.Services.Pctl diff --git a/Ryujinx.HLE/HOS/Services/Pl/ISharedFontManager.cs b/Ryujinx.HLE/HOS/Services/Pl/ISharedFontManager.cs index 1bdff31a..1c67d356 100644 --- a/Ryujinx.HLE/HOS/Services/Pl/ISharedFontManager.cs +++ b/Ryujinx.HLE/HOS/Services/Pl/ISharedFontManager.cs @@ -29,8 +29,8 @@ namespace Ryujinx.HLE.HOS.Services.Pl { SharedFontType fontType = (SharedFontType)context.RequestData.ReadInt32(); - //We don't need to do anything here because we do lazy initialization - //on SharedFontManager (the font is loaded when necessary). + // We don't need to do anything here because we do lazy initialization + // on SharedFontManager (the font is loaded when necessary). return 0; } @@ -38,8 +38,8 @@ namespace Ryujinx.HLE.HOS.Services.Pl { SharedFontType fontType = (SharedFontType)context.RequestData.ReadInt32(); - //1 (true) indicates that the font is already loaded. - //All fonts are already loaded. + // 1 (true) indicates that the font is already loaded. + // All fonts are already loaded. context.ResponseData.Write(1); return 0; diff --git a/Ryujinx.HLE/HOS/Services/Pm/IShellInterface.cs b/Ryujinx.HLE/HOS/Services/Pm/IShellInterface.cs index 8880b334..35fdd547 100644 --- a/Ryujinx.HLE/HOS/Services/Pm/IShellInterface.cs +++ b/Ryujinx.HLE/HOS/Services/Pm/IShellInterface.cs @@ -1,7 +1,5 @@ using Ryujinx.HLE.HOS.Ipc; -using System; using System.Collections.Generic; -using System.Text; namespace Ryujinx.HLE.HOS.Services.Pm { diff --git a/Ryujinx.HLE/HOS/Services/Set/ISystemSettingsServer.cs b/Ryujinx.HLE/HOS/Services/Set/ISystemSettingsServer.cs index 4a67638b..fd8ffe5e 100644 --- a/Ryujinx.HLE/HOS/Services/Set/ISystemSettingsServer.cs +++ b/Ryujinx.HLE/HOS/Services/Set/ISystemSettingsServer.cs @@ -62,7 +62,7 @@ namespace Ryujinx.HLE.HOS.Services.Set const string version = "3.0.0"; const string build = "NintendoSDK Firmware for NX 3.0.0-10.0"; - //http://switchbrew.org/index.php?title=System_Version_Title + // http://switchbrew.org/index.php?title=System_Version_Title using (MemoryStream ms = new MemoryStream(0x100)) { BinaryWriter writer = new BinaryWriter(ms); @@ -177,7 +177,7 @@ namespace Ryujinx.HLE.HOS.Services.Set long titleId = 0x0100000000000809; string contentPath = device.System.ContentManager.GetInstalledContentPath(titleId, StorageId.NandSystem, ContentType.Data); - if(string.IsNullOrWhiteSpace(contentPath)) + if (string.IsNullOrWhiteSpace(contentPath)) { return null; } diff --git a/Ryujinx.HLE/HOS/Services/Set/NxSettings.cs b/Ryujinx.HLE/HOS/Services/Set/NxSettings.cs index 70ab55f9..b47a5390 100644 --- a/Ryujinx.HLE/HOS/Services/Set/NxSettings.cs +++ b/Ryujinx.HLE/HOS/Services/Set/NxSettings.cs @@ -4,7 +4,7 @@ namespace Ryujinx.HLE.HOS.Services.Set { static class NxSettings { - //Generated automatically from a Switch 3.0 config file (Tid: 0100000000000818). + // Generated automatically from a Switch 3.0 config file (Tid: 0100000000000818). public static Dictionary<string, object> Settings = new Dictionary<string, object> { { "account!na_required_for_network_service", true }, diff --git a/Ryujinx.HLE/HOS/Services/Ssl/ISslContext.cs b/Ryujinx.HLE/HOS/Services/Ssl/ISslContext.cs index cf58ed87..1910998f 100644 --- a/Ryujinx.HLE/HOS/Services/Ssl/ISslContext.cs +++ b/Ryujinx.HLE/HOS/Services/Ssl/ISslContext.cs @@ -13,7 +13,7 @@ namespace Ryujinx.HLE.HOS.Services.Ssl { _commands = new Dictionary<int, ServiceProcessRequest> { - //... + // ... }; } } diff --git a/Ryujinx.HLE/HOS/Services/Vi/ColorFormat.cs b/Ryujinx.HLE/HOS/Services/Vi/ColorFormat.cs index 67848b43..70938585 100644 --- a/Ryujinx.HLE/HOS/Services/Vi/ColorFormat.cs +++ b/Ryujinx.HLE/HOS/Services/Vi/ColorFormat.cs @@ -1,4 +1,5 @@ -namespace Ryujinx.HLE.HOS.Services.Android +// ReSharper disable InconsistentNaming +namespace Ryujinx.HLE.HOS.Services.Android { class ColorShift { diff --git a/Ryujinx.HLE/HOS/Services/Vi/GbpBuffer.cs b/Ryujinx.HLE/HOS/Services/Vi/GbpBuffer.cs index eb1adc77..75b543b8 100644 --- a/Ryujinx.HLE/HOS/Services/Vi/GbpBuffer.cs +++ b/Ryujinx.HLE/HOS/Services/Vi/GbpBuffer.cs @@ -150,7 +150,7 @@ namespace Ryujinx.HLE.HOS.Services.Android if (Header.IntsCount != 0x51) { - throw new System.NotImplementedException($"Unexpected Graphic Buffer ints count (expected 0x51, found 0x{Header.IntsCount:x}"); + throw new NotImplementedException($"Unexpected Graphic Buffer ints count (expected 0x51, found 0x{Header.IntsCount:x}"); } Buffer = reader.ReadStruct<NvGraphicBuffer>(); diff --git a/Ryujinx.HLE/HOS/Services/Vi/IApplicationDisplayService.cs b/Ryujinx.HLE/HOS/Services/Vi/IApplicationDisplayService.cs index 686f85ef..be9fc263 100644 --- a/Ryujinx.HLE/HOS/Services/Vi/IApplicationDisplayService.cs +++ b/Ryujinx.HLE/HOS/Services/Vi/IApplicationDisplayService.cs @@ -81,7 +81,7 @@ namespace Ryujinx.HLE.HOS.Services.Vi MemoryHelper.FillWithZeros(context.Memory, recBuffPtr, 0x60); - //Add only the default display to buffer + // Add only the default display to buffer context.Memory.WriteBytes(recBuffPtr, Encoding.ASCII.GetBytes("Default")); context.Memory.WriteInt64(recBuffPtr + 0x40, 0x1L); context.Memory.WriteInt64(recBuffPtr + 0x48, 0x1L); @@ -186,14 +186,14 @@ namespace Ryujinx.HLE.HOS.Services.Vi if (!convertedScalingMode.HasValue) { - //Scaling mode out of the range of valid values. + // Scaling mode out of the range of valid values. return MakeError(ErrorModule.Vi, 1); } if (scalingMode != SrcScalingMode.ScaleToWindow && scalingMode != SrcScalingMode.PreserveAspectRatio) { - //Invalid scaling mode specified. + // Invalid scaling mode specified. return MakeError(ErrorModule.Vi, 6); } @@ -239,7 +239,7 @@ namespace Ryujinx.HLE.HOS.Services.Vi { BinaryWriter writer = new BinaryWriter(ms); - //flat_binder_object (size is 0x28) + // flat_binder_object (size is 0x28) writer.Write(2); //Type (BINDER_TYPE_WEAK_BINDER) writer.Write(0); //Flags writer.Write((int)(id >> 0)); diff --git a/Ryujinx.HLE/HOS/Services/Vi/ISystemDisplayService.cs b/Ryujinx.HLE/HOS/Services/Vi/ISystemDisplayService.cs index 6d001588..076618d7 100644 --- a/Ryujinx.HLE/HOS/Services/Vi/ISystemDisplayService.cs +++ b/Ryujinx.HLE/HOS/Services/Vi/ISystemDisplayService.cs @@ -37,7 +37,7 @@ namespace Ryujinx.HLE.HOS.Services.Vi public static long GetDisplayMode(ServiceCtx context) { - //TODO: De-hardcode resolution. + // TODO: De-hardcode resolution. context.ResponseData.Write(1280); context.ResponseData.Write(720); context.ResponseData.Write(60.0f); diff --git a/Ryujinx.HLE/HOS/Services/Vi/NvFlinger.cs b/Ryujinx.HLE/HOS/Services/Vi/NvFlinger.cs index 66c33279..d6b5fbdb 100644 --- a/Ryujinx.HLE/HOS/Services/Vi/NvFlinger.cs +++ b/Ryujinx.HLE/HOS/Services/Vi/NvFlinger.cs @@ -1,7 +1,6 @@ using Ryujinx.Common.Logging; using Ryujinx.Graphics.Gal; using Ryujinx.Graphics.Memory; -using Ryujinx.HLE.HOS.Kernel; using Ryujinx.HLE.HOS.Kernel.Threading; using Ryujinx.HLE.HOS.Services.Nv.NvGpuAS; using Ryujinx.HLE.HOS.Services.Nv.NvMap; @@ -213,7 +212,7 @@ namespace Ryujinx.HLE.HOS.Services.Android private long GbpDequeueBuffer(ServiceCtx context, BinaryReader parcelReader) { - //TODO: Errors. + // TODO: Errors. int format = parcelReader.ReadInt32(); int width = parcelReader.ReadInt32(); int height = parcelReader.ReadInt32(); @@ -229,7 +228,7 @@ namespace Ryujinx.HLE.HOS.Services.Android { context.Device.Statistics.RecordGameFrameTime(); - //TODO: Errors. + // TODO: Errors. int slot = parcelReader.ReadInt32(); long Position = parcelReader.BaseStream.Position; @@ -260,7 +259,7 @@ namespace Ryujinx.HLE.HOS.Services.Android private long GbpCancelBuffer(ServiceCtx context, BinaryReader parcelReader) { - //TODO: Errors. + // TODO: Errors. int slot = parcelReader.ReadInt32(); MultiFence fence = ReadFlattenedObject<MultiFence>(parcelReader); @@ -401,7 +400,7 @@ namespace Ryujinx.HLE.HOS.Services.Android int BlockHeight = 1 << _bufferQueue[slot].Data.Buffer.Surfaces[0].BlockHeightLog2; - //Note: Rotation is being ignored. + // Note: Rotation is being ignored. int top = crop.Top; int left = crop.Left; |
