sf: Change interface definition methodology (#1074)
* sf: Begin experimenting with new interface declaration format * sf: convert fs interfaces to new format * sf: finish conversion of libstrat to new definitions * sf: convert loader to new format * sf: convert spl to new format * sf: update ncm for new format * sf: convert pm to new format * sf: convert ro/sm to new format * sf: update fatal for new format * sf: support building dmnt under new scheme * sf: update ams.mitm for new format * sf: correct invocation def for pointer holder * fs: correct 10.x+ user bindings for Get*SpaceSize
This commit is contained in:
@@ -19,11 +19,18 @@
|
||||
|
||||
namespace ams::mitm::hid {
|
||||
|
||||
class HidMitmService : public sf::IMitmServiceObject {
|
||||
private:
|
||||
enum class CommandId {
|
||||
SetSupportedNpadStyleSet = 100,
|
||||
};
|
||||
namespace {
|
||||
|
||||
#define AMS_HID_MITM_INTERFACE_INFO(C, H) \
|
||||
AMS_SF_METHOD_INFO(C, H, 100, Result, SetSupportedNpadStyleSet, (const sf::ClientAppletResourceUserId &client_aruid, u32 style_set))
|
||||
|
||||
AMS_SF_DEFINE_MITM_INTERFACE(IHidMitmInterface, AMS_HID_MITM_INTERFACE_INFO)
|
||||
|
||||
}
|
||||
|
||||
class HidMitmService : public sf::MitmServiceImplBase {
|
||||
public:
|
||||
using MitmServiceImplBase::MitmServiceImplBase;
|
||||
public:
|
||||
static bool ShouldMitm(const sm::MitmProcessInfo &client_info) {
|
||||
/* TODO: Remove in Atmosphere 0.10.2. */
|
||||
@@ -33,14 +40,9 @@ namespace ams::mitm::hid {
|
||||
return client_info.override_status.IsHbl();
|
||||
}
|
||||
public:
|
||||
SF_MITM_SERVICE_OBJECT_CTOR(HidMitmService) { /* ... */ }
|
||||
protected:
|
||||
/* Overridden commands. */
|
||||
Result SetSupportedNpadStyleSet(const sf::ClientAppletResourceUserId &client_aruid, u32 style_set);
|
||||
public:
|
||||
DEFINE_SERVICE_DISPATCH_TABLE {
|
||||
MAKE_SERVICE_COMMAND_META(SetSupportedNpadStyleSet),
|
||||
};
|
||||
};
|
||||
static_assert(IsIHidMitmInterface<HidMitmService>);
|
||||
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ namespace ams::mitm::hid {
|
||||
}
|
||||
|
||||
/* Create hid mitm. */
|
||||
R_ABORT_UNLESS(g_server_manager.RegisterMitmServer<HidMitmService>(MitmServiceName));
|
||||
R_ABORT_UNLESS((g_server_manager.RegisterMitmServer<IHidMitmInterface, HidMitmService>(MitmServiceName)));
|
||||
|
||||
/* Loop forever, servicing our services. */
|
||||
g_server_manager.LoopProcess();
|
||||
|
||||
Reference in New Issue
Block a user