[Usbd] more stubs
This commit is contained in:
parent
3e760035b1
commit
0409f3aab1
|
|
@ -9,6 +9,58 @@ public static class UsbdExports
|
|||
{
|
||||
private const int SceUsbdErrorInvalidParam = unchecked((int)0x80240002);
|
||||
|
||||
[SysAbiExport(
|
||||
Nid = "TOhg7P6kTH4",
|
||||
ExportName = "sceUsbdInit",
|
||||
Target = Generation.Gen4 | Generation.Gen5,
|
||||
LibraryName = "libSceUsbd")]
|
||||
public static int UsbdInit(CpuContext ctx)
|
||||
{
|
||||
// SharpEmu does not expose host USB devices yet. Initializing an empty
|
||||
// backend still succeeds, allowing games to probe optional peripherals
|
||||
// and fall back to their normal controller path.
|
||||
return ctx.SetReturn(OrbisGen2Result.ORBIS_GEN2_OK);
|
||||
}
|
||||
|
||||
[SysAbiExport(
|
||||
Nid = "Fq6+0Fm55xU",
|
||||
ExportName = "sceUsbdExit",
|
||||
Target = Generation.Gen4 | Generation.Gen5,
|
||||
LibraryName = "libSceUsbd")]
|
||||
public static int UsbdExit(CpuContext ctx)
|
||||
{
|
||||
return ctx.SetReturn(OrbisGen2Result.ORBIS_GEN2_OK);
|
||||
}
|
||||
|
||||
[SysAbiExport(
|
||||
Nid = "8qB9Ar4P5nc",
|
||||
ExportName = "sceUsbdGetDeviceList",
|
||||
Target = Generation.Gen4 | Generation.Gen5,
|
||||
LibraryName = "libSceUsbd")]
|
||||
public static int UsbdGetDeviceList(CpuContext ctx)
|
||||
{
|
||||
var listAddress = ctx[CpuRegister.Rdi];
|
||||
if (listAddress == 0 || !ctx.TryWriteUInt64(listAddress, 0))
|
||||
{
|
||||
return ctx.SetReturn(SceUsbdErrorInvalidParam);
|
||||
}
|
||||
|
||||
// libusb_get_device_list returns a non-negative device count. Report an
|
||||
// empty list until a USB backend exists so wheel probing remains
|
||||
// optional instead of receiving an unresolved-import error sentinel.
|
||||
return ctx.SetReturn(0);
|
||||
}
|
||||
|
||||
[SysAbiExport(
|
||||
Nid = "EQ6SCLMqzkM",
|
||||
ExportName = "sceUsbdFreeDeviceList",
|
||||
Target = Generation.Gen4 | Generation.Gen5,
|
||||
LibraryName = "libSceUsbd")]
|
||||
public static int UsbdFreeDeviceList(CpuContext ctx)
|
||||
{
|
||||
return ctx.SetReturn(OrbisGen2Result.ORBIS_GEN2_OK);
|
||||
}
|
||||
|
||||
[SysAbiExport(
|
||||
Nid = "+wU6CGuZcWk",
|
||||
ExportName = "sceUsbdHandleEventsTimeout",
|
||||
|
|
|
|||
Loading…
Reference in New Issue