caps_c: Stub SetShimLibraryVersion

- Used by caps_su SetShimLibraryVersion
This commit is contained in:
Morph 2020-09-30 07:13:39 -04:00
parent 7d287a6fb0
commit 91bd2281bf
2 changed files with 18 additions and 1 deletions

View file

@ -2,6 +2,8 @@
// Licensed under GPLv2 or any later version // Licensed under GPLv2 or any later version
// Refer to the license.txt file included. // Refer to the license.txt file included.
#include "common/logging/log.h"
#include "core/hle/ipc_helpers.h"
#include "core/hle/service/caps/caps_c.h" #include "core/hle/service/caps/caps_c.h"
namespace Service::Capture { namespace Service::Capture {
@ -47,7 +49,7 @@ CAPS_C::CAPS_C() : ServiceFramework("caps:c") {
static const FunctionInfo functions[] = { static const FunctionInfo functions[] = {
{1, nullptr, "CaptureRawImage"}, {1, nullptr, "CaptureRawImage"},
{2, nullptr, "CaptureRawImageWithTimeout"}, {2, nullptr, "CaptureRawImageWithTimeout"},
{33, nullptr, "Unknown33"}, {33, &CAPS_C::SetShimLibraryVersion, "SetShimLibraryVersion"},
{1001, nullptr, "RequestTakingScreenShot"}, {1001, nullptr, "RequestTakingScreenShot"},
{1002, nullptr, "RequestTakingScreenShotWithTimeout"}, {1002, nullptr, "RequestTakingScreenShotWithTimeout"},
{1011, nullptr, "NotifyTakingScreenShotRefused"}, {1011, nullptr, "NotifyTakingScreenShotRefused"},
@ -72,4 +74,16 @@ CAPS_C::CAPS_C() : ServiceFramework("caps:c") {
CAPS_C::~CAPS_C() = default; CAPS_C::~CAPS_C() = default;
void CAPS_C::SetShimLibraryVersion(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp{ctx};
const auto library_version{rp.Pop<u64>()};
const auto applet_resource_user_id{rp.Pop<u64>()};
LOG_WARNING(Service_Capture, "(STUBBED) called. library_version={}, applet_resource_user_id={}",
library_version, applet_resource_user_id);
IPC::ResponseBuilder rb{ctx, 2};
rb.Push(RESULT_SUCCESS);
}
} // namespace Service::Capture } // namespace Service::Capture

View file

@ -16,6 +16,9 @@ class CAPS_C final : public ServiceFramework<CAPS_C> {
public: public:
explicit CAPS_C(); explicit CAPS_C();
~CAPS_C() override; ~CAPS_C() override;
private:
void SetShimLibraryVersion(Kernel::HLERequestContext& ctx);
}; };
} // namespace Service::Capture } // namespace Service::Capture