aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.HLE/HOS/Services/Fs/IDeviceOperator.cs
diff options
context:
space:
mode:
authorAlex Barney <thealexbarney@gmail.com>2019-10-17 01:17:44 -0500
committerAc_K <Acoustik666@gmail.com>2019-10-17 08:17:44 +0200
commit8a8ea4c8c00e8ba23349d9cdb0a6b681d09e6b0d (patch)
treeaee0876fbc6e5f9fd2808d942297938ab3ab9495 /Ryujinx.HLE/HOS/Services/Fs/IDeviceOperator.cs
parentc0fe6cdca0ebe6b19f8578893ec503d432683897 (diff)
Update to LibHac 0.6.0 (#792)
* Update to LibHac 0.6.0 * Create an IFileSystemProxy object from LibHac * Rename rc -> result * Alignment and spacing * Result formatting * Spacing * Sort usings
Diffstat (limited to 'Ryujinx.HLE/HOS/Services/Fs/IDeviceOperator.cs')
-rw-r--r--Ryujinx.HLE/HOS/Services/Fs/IDeviceOperator.cs37
1 files changed, 37 insertions, 0 deletions
diff --git a/Ryujinx.HLE/HOS/Services/Fs/IDeviceOperator.cs b/Ryujinx.HLE/HOS/Services/Fs/IDeviceOperator.cs
new file mode 100644
index 00000000..426b50ed
--- /dev/null
+++ b/Ryujinx.HLE/HOS/Services/Fs/IDeviceOperator.cs
@@ -0,0 +1,37 @@
+using LibHac;
+using LibHac.FsService;
+
+namespace Ryujinx.HLE.HOS.Services.Fs
+{
+ class IDeviceOperator : IpcService
+ {
+ private LibHac.FsService.IDeviceOperator _baseOperator;
+
+ public IDeviceOperator(LibHac.FsService.IDeviceOperator baseOperator)
+ {
+ _baseOperator = baseOperator;
+ }
+
+ [Command(200)]
+ // IsGameCardInserted() -> b8 is_inserted
+ public ResultCode IsGameCardInserted(ServiceCtx context)
+ {
+ Result result = _baseOperator.IsGameCardInserted(out bool isInserted);
+
+ context.ResponseData.Write(isInserted);
+
+ return (ResultCode)result.Value;
+ }
+
+ [Command(202)]
+ // GetGameCardHandle() -> u32 gamecard_handle
+ public ResultCode GetGameCardHandle(ServiceCtx context)
+ {
+ Result result = _baseOperator.GetGameCardHandle(out GameCardHandle handle);
+
+ context.ResponseData.Write(handle.Value);
+
+ return (ResultCode)result.Value;
+ }
+ }
+}