Standardize todo capitalization and for/if spacing

This commit is contained in:
Alex Barney 2019-07-01 21:19:46 -05:00
commit d3b88f24a7
12 changed files with 23 additions and 23 deletions

View file

@ -32,7 +32,7 @@ namespace Ryujinx.Audio
{ {
int trackId; int trackId;
if(!m_TrackIds.TryDequeue(out trackId)) if (!m_TrackIds.TryDequeue(out trackId))
{ {
trackId = ++lastTrackId; trackId = ++lastTrackId;
} }
@ -57,7 +57,7 @@ namespace Ryujinx.Audio
{ {
m_Buffers.Enqueue(bufferTag); m_Buffers.Enqueue(bufferTag);
if(m_ReleaseCallbacks.TryGetValue(trackID, out var callback)) if (m_ReleaseCallbacks.TryGetValue(trackID, out var callback))
{ {
callback?.Invoke(); callback?.Invoke();
} }

View file

@ -138,7 +138,7 @@ namespace Ryujinx.Audio
public void AppendBuffer<T>(int trackId, long bufferTag, T[] buffer) public void AppendBuffer<T>(int trackId, long bufferTag, T[] buffer)
where T : struct where T : struct
{ {
if(m_TrackPool.TryGet(trackId, out SoundIoAudioTrack track)) if (m_TrackPool.TryGet(trackId, out SoundIoAudioTrack track))
{ {
track.AppendBuffer(bufferTag, buffer); track.AppendBuffer(bufferTag, buffer);
} }
@ -201,12 +201,12 @@ namespace Ryujinx.Audio
{ {
SoundIODevice defaultAudioDevice = audioContext.GetOutputDevice(audioContext.DefaultOutputDeviceIndex); SoundIODevice defaultAudioDevice = audioContext.GetOutputDevice(audioContext.DefaultOutputDeviceIndex);
if(!defaultAudioDevice.IsRaw) if (!defaultAudioDevice.IsRaw)
{ {
return defaultAudioDevice; return defaultAudioDevice;
} }
for(int i = 0; i < audioContext.BackendCount; i++) for (int i = 0; i < audioContext.BackendCount; i++)
{ {
SoundIODevice audioDevice = audioContext.GetOutputDevice(i); SoundIODevice audioDevice = audioContext.GetOutputDevice(i);
@ -242,26 +242,26 @@ namespace Ryujinx.Audio
context.Connect(); context.Connect();
context.FlushEvents(); context.FlushEvents();
if(backendDisconnected) if (backendDisconnected)
{ {
return false; return false;
} }
if(context.OutputDeviceCount == 0) if (context.OutputDeviceCount == 0)
{ {
return false; return false;
} }
device = FindNonRawDefaultAudioDevice(context); device = FindNonRawDefaultAudioDevice(context);
if(device == null || backendDisconnected) if (device == null || backendDisconnected)
{ {
return false; return false;
} }
stream = device.CreateOutStream(); stream = device.CreateOutStream();
if(stream == null || backendDisconnected) if (stream == null || backendDisconnected)
{ {
return false; return false;
} }
@ -274,12 +274,12 @@ namespace Ryujinx.Audio
} }
finally finally
{ {
if(stream != null) if (stream != null)
{ {
stream.Dispose(); stream.Dispose();
} }
if(context != null) if (context != null)
{ {
context.Dispose(); context.Dispose();
} }

View file

@ -65,7 +65,7 @@ namespace Ryujinx.Graphics.Texture
public void ChangeBitDepth(byte[] depth) public void ChangeBitDepth(byte[] depth)
{ {
for(int i = 0; i< 4; i++) for (int i = 0; i< 4; i++)
{ {
int value = ChangeBitDepth(GetComponent(i), _bitDepth[i], depth[i]); int value = ChangeBitDepth(GetComponent(i), _bitDepth[i], depth[i]);

View file

@ -131,7 +131,7 @@ namespace Ryujinx.HLE.FileSystem.Content
} }
} }
if(_locationEntries.ContainsKey(storageId) && _locationEntries[storageId]?.Count == 0) if (_locationEntries.ContainsKey(storageId) && _locationEntries[storageId]?.Count == 0)
{ {
_locationEntries.Remove(storageId); _locationEntries.Remove(storageId);
} }

View file

@ -23,7 +23,7 @@ namespace Ryujinx.HLE.HOS.Services.Am
{ 21, GetPopFromGeneralChannelEvent } { 21, GetPopFromGeneralChannelEvent }
}; };
// ToDo: Signal this Event somewhere in future. // TODO: Signal this Event somewhere in future.
_channelEvent = new KEvent(system); _channelEvent = new KEvent(system);
} }

View file

@ -108,7 +108,7 @@ namespace Ryujinx.HLE.HOS.Services.Friend
long position = context.Request.PtrBuff[0].Position; long position = context.Request.PtrBuff[0].Position;
long size = context.Request.PtrBuff[0].Size; 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 }); Logger.PrintStub(LogClass.ServiceFriend, new { UserId = uuid.ToString(), unknown0 });

View file

@ -1014,7 +1014,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
context.Request.PtrBuff[1].Position, context.Request.PtrBuff[1].Position,
context.Request.PtrBuff[1].Size); 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 { Logger.PrintStub(LogClass.ServiceHid, new {
appletResourceUserId, appletResourceUserId,
@ -1137,7 +1137,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
long counter0 = context.RequestData.ReadInt64(); long counter0 = context.RequestData.ReadInt64();
long counter1 = 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 }); Logger.PrintStub(LogClass.ServiceHid, new { appletResourceUserId, counter0, counter1 });

View file

@ -523,7 +523,7 @@ namespace Ryujinx.HLE.HOS.Services.Ldr
NrrInfo info; NrrInfo info;
result = ParseNrr(out info, context, nrrAddress, nrrSize); result = ParseNrr(out info, context, nrrAddress, nrrSize);
if(result == 0) if (result == 0)
{ {
if (_nrrInfos.Count >= MaxNrr) if (_nrrInfos.Count >= MaxNrr)
{ {

View file

@ -177,7 +177,7 @@ namespace Ryujinx.HLE.HOS.Services.Set
long titleId = 0x0100000000000809; long titleId = 0x0100000000000809;
string contentPath = device.System.ContentManager.GetInstalledContentPath(titleId, StorageId.NandSystem, ContentType.Data); string contentPath = device.System.ContentManager.GetInstalledContentPath(titleId, StorageId.NandSystem, ContentType.Data);
if(string.IsNullOrWhiteSpace(contentPath)) if (string.IsNullOrWhiteSpace(contentPath))
{ {
return null; return null;
} }

View file

@ -36,7 +36,7 @@
public override void Connect(HidControllerId controllerId) public override void Connect(HidControllerId controllerId)
{ {
if(HidControllerType != HidControllerType.NpadLeft && HidControllerType != HidControllerType.NpadRight) if (HidControllerType != HidControllerType.NpadLeft && HidControllerType != HidControllerType.NpadRight)
{ {
_isHalf = false; _isHalf = false;
} }

View file

@ -9,7 +9,7 @@ namespace Ryujinx.Tests.Unicorn
public IndexedProperty(Func<TIndex, TValue> getFunc, Action<TIndex, TValue> setAction) public IndexedProperty(Func<TIndex, TValue> getFunc, Action<TIndex, TValue> setAction)
{ {
GetFunc = getFunc; GetFunc = getFunc;
SetAction = setAction; SetAction = setAction;
} }

View file

@ -246,7 +246,7 @@ namespace Ryujinx
ServiceConfiguration.IgnoreMissingServices = Instance.IgnoreMissingServices; ServiceConfiguration.IgnoreMissingServices = Instance.IgnoreMissingServices;
if(Instance.GamepadControls.Enabled) if (Instance.GamepadControls.Enabled)
{ {
if (GamePad.GetName(Instance.GamepadControls.Index) == "Unmapped Controller") if (GamePad.GetName(Instance.GamepadControls.Index) == "Unmapped Controller")
{ {
@ -277,7 +277,7 @@ namespace Ryujinx
string enumName = formatterResolver.GetFormatterWithVerify<string>() string enumName = formatterResolver.GetFormatterWithVerify<string>()
.Deserialize(ref reader, formatterResolver); .Deserialize(ref reader, formatterResolver);
if(Enum.TryParse<T>(enumName, out T result)) if (Enum.TryParse<T>(enumName, out T result))
{ {
return result; return result;
} }