aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Common/Utilities/StreamUtils.cs
diff options
context:
space:
mode:
authorAc_K <Acoustik666@gmail.com>2021-09-15 01:24:49 +0200
committerGitHub <noreply@github.com>2021-09-15 01:24:49 +0200
commit5d08e9b495a2315e8a4758a8123466665085d044 (patch)
tree54a189acc7d9589e9678cc431b1bc9cca40682d0 /Ryujinx.Common/Utilities/StreamUtils.cs
parent3f2486342b3ef4610b6af6a52624614d2a7ad8ae (diff)
hos: Cleanup the project (#2634)
* hos: Cleanup the project Since a lot of changes has been done on the HOS project, there are some leftover here and there, or class just used in one service, things at wrong places, and more. This PR fixes that, additionnally to that, I've realigned some vars because I though it make the code more readable. * Address gdkchan feedback * addresses Thog feedback * Revert ElfSymbol
Diffstat (limited to 'Ryujinx.Common/Utilities/StreamUtils.cs')
-rw-r--r--Ryujinx.Common/Utilities/StreamUtils.cs17
1 files changed, 17 insertions, 0 deletions
diff --git a/Ryujinx.Common/Utilities/StreamUtils.cs b/Ryujinx.Common/Utilities/StreamUtils.cs
new file mode 100644
index 00000000..9bd03ec9
--- /dev/null
+++ b/Ryujinx.Common/Utilities/StreamUtils.cs
@@ -0,0 +1,17 @@
+using System.IO;
+
+namespace Ryujinx.Common.Utilities
+{
+ public static class StreamUtils
+ {
+ public static byte[] StreamToBytes(Stream input)
+ {
+ using (MemoryStream stream = new MemoryStream())
+ {
+ input.CopyTo(stream);
+
+ return stream.ToArray();
+ }
+ }
+ }
+} \ No newline at end of file