2
1
Fork 0
mirror of https://github.com/yuzu-emu/yuzu.git synced 2024-07-04 23:31:19 +01:00

nvdrv: Implement/stub DumpGraphicsMemoryInfo and GetStatus.

- Used by Undertale.
This commit is contained in:
bunnei 2018-11-23 14:55:41 -05:00
parent 69b3f98d3a
commit 0d673a84b6
2 changed files with 18 additions and 2 deletions

View file

@ -88,6 +88,20 @@ void NVDRV::FinishInitialize(Kernel::HLERequestContext& ctx) {
rb.Push(RESULT_SUCCESS); rb.Push(RESULT_SUCCESS);
} }
void NVDRV::GetStatus(Kernel::HLERequestContext& ctx) {
LOG_WARNING(Service_NVDRV, "(STUBBED) called");
IPC::ResponseBuilder rb{ctx, 2};
rb.Push(RESULT_SUCCESS);
}
void NVDRV::DumpGraphicsMemoryInfo(Kernel::HLERequestContext& ctx) {
// According to SwitchBrew, this has no inputs and no outputs, so effectively does nothing on
// retail hardware.
LOG_DEBUG(Service_NVDRV, "called");
IPC::ResponseBuilder rb{ctx, 2};
rb.Push(RESULT_SUCCESS);
}
NVDRV::NVDRV(std::shared_ptr<Module> nvdrv, const char* name) NVDRV::NVDRV(std::shared_ptr<Module> nvdrv, const char* name)
: ServiceFramework(name), nvdrv(std::move(nvdrv)) { : ServiceFramework(name), nvdrv(std::move(nvdrv)) {
static const FunctionInfo functions[] = { static const FunctionInfo functions[] = {
@ -97,10 +111,10 @@ NVDRV::NVDRV(std::shared_ptr<Module> nvdrv, const char* name)
{3, &NVDRV::Initialize, "Initialize"}, {3, &NVDRV::Initialize, "Initialize"},
{4, &NVDRV::QueryEvent, "QueryEvent"}, {4, &NVDRV::QueryEvent, "QueryEvent"},
{5, nullptr, "MapSharedMem"}, {5, nullptr, "MapSharedMem"},
{6, nullptr, "GetStatus"}, {6, &NVDRV::GetStatus, "GetStatus"},
{7, nullptr, "ForceSetClientPID"}, {7, nullptr, "ForceSetClientPID"},
{8, &NVDRV::SetClientPID, "SetClientPID"}, {8, &NVDRV::SetClientPID, "SetClientPID"},
{9, nullptr, "DumpGraphicsMemoryInfo"}, {9, &NVDRV::DumpGraphicsMemoryInfo, "DumpGraphicsMemoryInfo"},
{10, nullptr, "InitializeDevtools"}, {10, nullptr, "InitializeDevtools"},
{11, &NVDRV::Ioctl, "Ioctl2"}, {11, &NVDRV::Ioctl, "Ioctl2"},
{12, nullptr, "Ioctl3"}, {12, nullptr, "Ioctl3"},

View file

@ -24,6 +24,8 @@ private:
void QueryEvent(Kernel::HLERequestContext& ctx); void QueryEvent(Kernel::HLERequestContext& ctx);
void SetClientPID(Kernel::HLERequestContext& ctx); void SetClientPID(Kernel::HLERequestContext& ctx);
void FinishInitialize(Kernel::HLERequestContext& ctx); void FinishInitialize(Kernel::HLERequestContext& ctx);
void GetStatus(Kernel::HLERequestContext& ctx);
void DumpGraphicsMemoryInfo(Kernel::HLERequestContext& ctx);
std::shared_ptr<Module> nvdrv; std::shared_ptr<Module> nvdrv;