From 2e61e16f344c1fb2316e68f62f5af2249fae74fb Mon Sep 17 00:00:00 2001 From: gdkchan Date: Wed, 15 Aug 2018 19:40:18 -0300 Subject: [PATCH] Move Exceptions and Utilities out of OsHle --- .../{OsHle => }/Exceptions/GuestBrokeExecutionException.cs | 2 +- .../{OsHle => }/Exceptions/UndefinedInstructionException.cs | 2 +- Ryujinx.HLE/Loaders/Executable.cs | 2 +- Ryujinx.HLE/Loaders/Npdm/Npdm.cs | 2 +- Ryujinx.HLE/OsHle/Font/SharedFontManager.cs | 2 +- Ryujinx.HLE/OsHle/Kernel/SvcSystem.cs | 2 +- Ryujinx.HLE/OsHle/Process.cs | 4 ++-- Ryujinx.HLE/OsHle/Services/Acc/IProfile.cs | 2 +- .../OsHle/Services/Aud/AudioRenderer/IAudioRenderer.cs | 2 +- Ryujinx.HLE/OsHle/Services/Aud/IAudioRendererManager.cs | 2 +- Ryujinx.HLE/OsHle/Services/Bsd/IClient.cs | 2 +- Ryujinx.HLE/OsHle/Services/Nv/NvMap/NvMapIoctl.cs | 2 +- Ryujinx.HLE/OsHle/SystemState/UserId.cs | 2 +- Ryujinx.HLE/{OsHle => }/Utilities/EndianSwap.cs | 4 ++-- Ryujinx.HLE/{OsHle => }/Utilities/IntUtils.cs | 2 +- Ryujinx.HLE/{OsHle => }/Utilities/StringUtils.cs | 2 +- Ryujinx.HLE/{OsHle => }/Utilities/StructReader.cs | 2 +- Ryujinx.HLE/{OsHle => }/Utilities/StructWriter.cs | 2 +- 18 files changed, 20 insertions(+), 20 deletions(-) rename Ryujinx.HLE/{OsHle => }/Exceptions/GuestBrokeExecutionException.cs (85%) rename Ryujinx.HLE/{OsHle => }/Exceptions/UndefinedInstructionException.cs (90%) rename Ryujinx.HLE/{OsHle => }/Utilities/EndianSwap.cs (90%) rename Ryujinx.HLE/{OsHle => }/Utilities/IntUtils.cs (93%) rename Ryujinx.HLE/{OsHle => }/Utilities/StringUtils.cs (97%) rename Ryujinx.HLE/{OsHle => }/Utilities/StructReader.cs (96%) rename Ryujinx.HLE/{OsHle => }/Utilities/StructWriter.cs (93%) diff --git a/Ryujinx.HLE/OsHle/Exceptions/GuestBrokeExecutionException.cs b/Ryujinx.HLE/Exceptions/GuestBrokeExecutionException.cs similarity index 85% rename from Ryujinx.HLE/OsHle/Exceptions/GuestBrokeExecutionException.cs rename to Ryujinx.HLE/Exceptions/GuestBrokeExecutionException.cs index 2ed7f19e3b..fe41b02a69 100644 --- a/Ryujinx.HLE/OsHle/Exceptions/GuestBrokeExecutionException.cs +++ b/Ryujinx.HLE/Exceptions/GuestBrokeExecutionException.cs @@ -1,6 +1,6 @@ using System; -namespace Ryujinx.HLE.OsHle.Exceptions +namespace Ryujinx.HLE.Exceptions { public class GuestBrokeExecutionException : Exception { diff --git a/Ryujinx.HLE/OsHle/Exceptions/UndefinedInstructionException.cs b/Ryujinx.HLE/Exceptions/UndefinedInstructionException.cs similarity index 90% rename from Ryujinx.HLE/OsHle/Exceptions/UndefinedInstructionException.cs rename to Ryujinx.HLE/Exceptions/UndefinedInstructionException.cs index d9f0b8cf9c..24bf9efdde 100644 --- a/Ryujinx.HLE/OsHle/Exceptions/UndefinedInstructionException.cs +++ b/Ryujinx.HLE/Exceptions/UndefinedInstructionException.cs @@ -1,6 +1,6 @@ using System; -namespace Ryujinx.HLE.OsHle.Exceptions +namespace Ryujinx.HLE.Exceptions { public class UndefinedInstructionException : Exception { diff --git a/Ryujinx.HLE/Loaders/Executable.cs b/Ryujinx.HLE/Loaders/Executable.cs index 2f8f698925..9332823000 100644 --- a/Ryujinx.HLE/Loaders/Executable.cs +++ b/Ryujinx.HLE/Loaders/Executable.cs @@ -2,7 +2,7 @@ using ChocolArm64.Memory; using Ryujinx.HLE.Loaders.Executables; using Ryujinx.HLE.OsHle; using Ryujinx.HLE.OsHle.Kernel; -using Ryujinx.HLE.OsHle.Utilities; +using Ryujinx.HLE.Utilities; using System.Collections.Generic; using System.IO; diff --git a/Ryujinx.HLE/Loaders/Npdm/Npdm.cs b/Ryujinx.HLE/Loaders/Npdm/Npdm.cs index eaa662f03b..14151b4c00 100644 --- a/Ryujinx.HLE/Loaders/Npdm/Npdm.cs +++ b/Ryujinx.HLE/Loaders/Npdm/Npdm.cs @@ -1,4 +1,4 @@ -using Ryujinx.HLE.OsHle.Utilities; +using Ryujinx.HLE.Utilities; using System.IO; using System.Text; diff --git a/Ryujinx.HLE/OsHle/Font/SharedFontManager.cs b/Ryujinx.HLE/OsHle/Font/SharedFontManager.cs index 12b6973e00..ee53a9ea33 100644 --- a/Ryujinx.HLE/OsHle/Font/SharedFontManager.cs +++ b/Ryujinx.HLE/OsHle/Font/SharedFontManager.cs @@ -1,5 +1,5 @@ using Ryujinx.HLE.Memory; -using Ryujinx.HLE.OsHle.Utilities; +using Ryujinx.HLE.Utilities; using Ryujinx.HLE.Resource; using System.Collections.Generic; using System.IO; diff --git a/Ryujinx.HLE/OsHle/Kernel/SvcSystem.cs b/Ryujinx.HLE/OsHle/Kernel/SvcSystem.cs index 130d596970..6931bb2a17 100644 --- a/Ryujinx.HLE/OsHle/Kernel/SvcSystem.cs +++ b/Ryujinx.HLE/OsHle/Kernel/SvcSystem.cs @@ -1,7 +1,7 @@ using ChocolArm64.Memory; using ChocolArm64.State; using Ryujinx.HLE.Logging; -using Ryujinx.HLE.OsHle.Exceptions; +using Ryujinx.HLE.Exceptions; using Ryujinx.HLE.OsHle.Ipc; using Ryujinx.HLE.OsHle.Services; using System; diff --git a/Ryujinx.HLE/OsHle/Process.cs b/Ryujinx.HLE/OsHle/Process.cs index f905ec6dc4..0a5028fbbc 100644 --- a/Ryujinx.HLE/OsHle/Process.cs +++ b/Ryujinx.HLE/OsHle/Process.cs @@ -7,11 +7,11 @@ using Ryujinx.HLE.Loaders.Executables; using Ryujinx.HLE.Loaders.Npdm; using Ryujinx.HLE.Logging; using Ryujinx.HLE.OsHle.Diagnostics; -using Ryujinx.HLE.OsHle.Exceptions; +using Ryujinx.HLE.Exceptions; using Ryujinx.HLE.OsHle.Kernel; using Ryujinx.HLE.OsHle.Services.Nv; using Ryujinx.HLE.OsHle.SystemState; -using Ryujinx.HLE.OsHle.Utilities; +using Ryujinx.HLE.Utilities; using System; using System.Collections.Concurrent; using System.Collections.Generic; diff --git a/Ryujinx.HLE/OsHle/Services/Acc/IProfile.cs b/Ryujinx.HLE/OsHle/Services/Acc/IProfile.cs index 449265f68f..b0d9a009d7 100644 --- a/Ryujinx.HLE/OsHle/Services/Acc/IProfile.cs +++ b/Ryujinx.HLE/OsHle/Services/Acc/IProfile.cs @@ -2,7 +2,7 @@ using ChocolArm64.Memory; using Ryujinx.HLE.Logging; using Ryujinx.HLE.OsHle.Ipc; using Ryujinx.HLE.OsHle.SystemState; -using Ryujinx.HLE.OsHle.Utilities; +using Ryujinx.HLE.Utilities; using System.Collections.Generic; using System.Text; diff --git a/Ryujinx.HLE/OsHle/Services/Aud/AudioRenderer/IAudioRenderer.cs b/Ryujinx.HLE/OsHle/Services/Aud/AudioRenderer/IAudioRenderer.cs index 0dde04a899..8b69426817 100644 --- a/Ryujinx.HLE/OsHle/Services/Aud/AudioRenderer/IAudioRenderer.cs +++ b/Ryujinx.HLE/OsHle/Services/Aud/AudioRenderer/IAudioRenderer.cs @@ -4,7 +4,7 @@ using Ryujinx.Audio.Adpcm; using Ryujinx.HLE.Logging; using Ryujinx.HLE.OsHle.Ipc; using Ryujinx.HLE.OsHle.Kernel; -using Ryujinx.HLE.OsHle.Utilities; +using Ryujinx.HLE.Utilities; using System; using System.Collections.Generic; using System.Runtime.InteropServices; diff --git a/Ryujinx.HLE/OsHle/Services/Aud/IAudioRendererManager.cs b/Ryujinx.HLE/OsHle/Services/Aud/IAudioRendererManager.cs index f2e3355429..55906cbc9a 100644 --- a/Ryujinx.HLE/OsHle/Services/Aud/IAudioRendererManager.cs +++ b/Ryujinx.HLE/OsHle/Services/Aud/IAudioRendererManager.cs @@ -2,7 +2,7 @@ using Ryujinx.Audio; using Ryujinx.HLE.Logging; using Ryujinx.HLE.OsHle.Ipc; using Ryujinx.HLE.OsHle.Services.Aud.AudioRenderer; -using Ryujinx.HLE.OsHle.Utilities; +using Ryujinx.HLE.Utilities; using System.Collections.Generic; using static Ryujinx.HLE.OsHle.ErrorCode; diff --git a/Ryujinx.HLE/OsHle/Services/Bsd/IClient.cs b/Ryujinx.HLE/OsHle/Services/Bsd/IClient.cs index 15ce92a163..14050e94b7 100644 --- a/Ryujinx.HLE/OsHle/Services/Bsd/IClient.cs +++ b/Ryujinx.HLE/OsHle/Services/Bsd/IClient.cs @@ -1,5 +1,5 @@ using Ryujinx.HLE.OsHle.Ipc; -using Ryujinx.HLE.OsHle.Utilities; +using Ryujinx.HLE.Utilities; using System.Collections.Generic; using System.IO; using System.Net; diff --git a/Ryujinx.HLE/OsHle/Services/Nv/NvMap/NvMapIoctl.cs b/Ryujinx.HLE/OsHle/Services/Nv/NvMap/NvMapIoctl.cs index 6c71d5d037..6eaccf8984 100644 --- a/Ryujinx.HLE/OsHle/Services/Nv/NvMap/NvMapIoctl.cs +++ b/Ryujinx.HLE/OsHle/Services/Nv/NvMap/NvMapIoctl.cs @@ -1,7 +1,7 @@ using ChocolArm64.Memory; using Ryujinx.HLE.Gpu.Memory; using Ryujinx.HLE.Logging; -using Ryujinx.HLE.OsHle.Utilities; +using Ryujinx.HLE.Utilities; using System.Collections.Concurrent; namespace Ryujinx.HLE.OsHle.Services.Nv.NvMap diff --git a/Ryujinx.HLE/OsHle/SystemState/UserId.cs b/Ryujinx.HLE/OsHle/SystemState/UserId.cs index 278ea9f772..4c021bc16b 100644 --- a/Ryujinx.HLE/OsHle/SystemState/UserId.cs +++ b/Ryujinx.HLE/OsHle/SystemState/UserId.cs @@ -1,4 +1,4 @@ -using Ryujinx.HLE.OsHle.Utilities; +using Ryujinx.HLE.Utilities; using System; using System.IO; using System.Linq; diff --git a/Ryujinx.HLE/OsHle/Utilities/EndianSwap.cs b/Ryujinx.HLE/Utilities/EndianSwap.cs similarity index 90% rename from Ryujinx.HLE/OsHle/Utilities/EndianSwap.cs rename to Ryujinx.HLE/Utilities/EndianSwap.cs index 46a2edcb6c..d773516d35 100644 --- a/Ryujinx.HLE/OsHle/Utilities/EndianSwap.cs +++ b/Ryujinx.HLE/Utilities/EndianSwap.cs @@ -1,9 +1,9 @@ -namespace Ryujinx.HLE.OsHle.Utilities +namespace Ryujinx.HLE.Utilities { static class EndianSwap { public static short Swap16(short Value) => (short)(((Value >> 8) & 0xff) | (Value << 8)); - + public static int Swap32(int Value) { uint UintVal = (uint)Value; diff --git a/Ryujinx.HLE/OsHle/Utilities/IntUtils.cs b/Ryujinx.HLE/Utilities/IntUtils.cs similarity index 93% rename from Ryujinx.HLE/OsHle/Utilities/IntUtils.cs rename to Ryujinx.HLE/Utilities/IntUtils.cs index 010dbb20d1..57e9d396f3 100644 --- a/Ryujinx.HLE/OsHle/Utilities/IntUtils.cs +++ b/Ryujinx.HLE/Utilities/IntUtils.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.OsHle.Utilities +namespace Ryujinx.HLE.Utilities { static class IntUtils { diff --git a/Ryujinx.HLE/OsHle/Utilities/StringUtils.cs b/Ryujinx.HLE/Utilities/StringUtils.cs similarity index 97% rename from Ryujinx.HLE/OsHle/Utilities/StringUtils.cs rename to Ryujinx.HLE/Utilities/StringUtils.cs index 90f34695c4..e8d6550ad1 100644 --- a/Ryujinx.HLE/OsHle/Utilities/StringUtils.cs +++ b/Ryujinx.HLE/Utilities/StringUtils.cs @@ -3,7 +3,7 @@ using System.Globalization; using System.Linq; using System.Text; -namespace Ryujinx.HLE.OsHle.Utilities +namespace Ryujinx.HLE.Utilities { static class StringUtils { diff --git a/Ryujinx.HLE/OsHle/Utilities/StructReader.cs b/Ryujinx.HLE/Utilities/StructReader.cs similarity index 96% rename from Ryujinx.HLE/OsHle/Utilities/StructReader.cs rename to Ryujinx.HLE/Utilities/StructReader.cs index e218288b6e..6e942a9b0d 100644 --- a/Ryujinx.HLE/OsHle/Utilities/StructReader.cs +++ b/Ryujinx.HLE/Utilities/StructReader.cs @@ -1,7 +1,7 @@ using ChocolArm64.Memory; using System.Runtime.InteropServices; -namespace Ryujinx.HLE.OsHle.Utilities +namespace Ryujinx.HLE.Utilities { class StructReader { diff --git a/Ryujinx.HLE/OsHle/Utilities/StructWriter.cs b/Ryujinx.HLE/Utilities/StructWriter.cs similarity index 93% rename from Ryujinx.HLE/OsHle/Utilities/StructWriter.cs rename to Ryujinx.HLE/Utilities/StructWriter.cs index 7daa95fb63..8b88105c6a 100644 --- a/Ryujinx.HLE/OsHle/Utilities/StructWriter.cs +++ b/Ryujinx.HLE/Utilities/StructWriter.cs @@ -1,7 +1,7 @@ using ChocolArm64.Memory; using System.Runtime.InteropServices; -namespace Ryujinx.HLE.OsHle.Utilities +namespace Ryujinx.HLE.Utilities { class StructWriter {