mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2024-11-14 09:36:42 +00:00
0746b83edf
* Rename CommandAttribute as CommandHIpcAttribute to prepare for 12.x changes * Implement inital support for TIPC and adds SM command ids * *Ipc to *ipc * Missed a ref in last commit... * CommandAttributeTIpc to CommandAttributeTipc * Addresses comment and fixes some bugs around TIPC doesn't have any padding requirements as buffer C isn't a thing Fix for RegisterService inverting two argument only on TIPC
48 lines
1.3 KiB
C#
48 lines
1.3 KiB
C#
using LibHac;
|
|
using LibHac.FsSrv;
|
|
|
|
namespace Ryujinx.HLE.HOS.Services.Fs
|
|
{
|
|
class IDeviceOperator : IpcService
|
|
{
|
|
private LibHac.FsSrv.IDeviceOperator _baseOperator;
|
|
|
|
public IDeviceOperator(LibHac.FsSrv.IDeviceOperator baseOperator)
|
|
{
|
|
_baseOperator = baseOperator;
|
|
}
|
|
|
|
[CommandHipc(0)]
|
|
// IsSdCardInserted() -> b8 is_inserted
|
|
public ResultCode IsSdCardInserted(ServiceCtx context)
|
|
{
|
|
Result result = _baseOperator.IsSdCardInserted(out bool isInserted);
|
|
|
|
context.ResponseData.Write(isInserted);
|
|
|
|
return (ResultCode)result.Value;
|
|
}
|
|
|
|
[CommandHipc(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;
|
|
}
|
|
|
|
[CommandHipc(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;
|
|
}
|
|
}
|
|
}
|