diff options
| author | 2018-02-09 00:56:45 -0500 | |
|---|---|---|
| committer | 2018-02-09 00:56:45 -0500 | |
| commit | 22caeee64f762bbeca52c6faebeba2cfb0074e86 (patch) | |
| tree | 90babf269ff047fc9f70d97ba29588aaa30558d3 /src | |
| parent | IApplicationDisplayService::CloseDisplay: Fix response params size. (diff) | |
| download | yuzu-22caeee64f762bbeca52c6faebeba2cfb0074e86.tar.gz yuzu-22caeee64f762bbeca52c6faebeba2cfb0074e86.tar.xz yuzu-22caeee64f762bbeca52c6faebeba2cfb0074e86.zip | |
nvdrv: Fix QueryEvent for libnx.
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/hle/service/nvdrv/interface.cpp | 9 | ||||
| -rw-r--r-- | src/core/hle/service/nvdrv/interface.h | 3 |
2 files changed, 8 insertions, 4 deletions
diff --git a/src/core/hle/service/nvdrv/interface.cpp b/src/core/hle/service/nvdrv/interface.cpp index 0edb64cc3..367791da6 100644 --- a/src/core/hle/service/nvdrv/interface.cpp +++ b/src/core/hle/service/nvdrv/interface.cpp | |||
| @@ -78,11 +78,10 @@ void NVDRV::QueryEvent(Kernel::HLERequestContext& ctx) { | |||
| 78 | u32 event_id = rp.Pop<u32>(); | 78 | u32 event_id = rp.Pop<u32>(); |
| 79 | LOG_WARNING(Service_NVDRV, "(STUBBED) called, fd=%x, event_id=%x", fd, event_id); | 79 | LOG_WARNING(Service_NVDRV, "(STUBBED) called, fd=%x, event_id=%x", fd, event_id); |
| 80 | 80 | ||
| 81 | IPC::ResponseBuilder rb{ctx, 2, 1}; | 81 | IPC::ResponseBuilder rb{ctx, 3, 1}; |
| 82 | rb.Push(RESULT_SUCCESS); | 82 | rb.Push(RESULT_SUCCESS); |
| 83 | auto event = Kernel::Event::Create(Kernel::ResetType::Pulse, "NVEvent"); | 83 | rb.PushCopyObjects(query_event); |
| 84 | event->Signal(); | 84 | rb.Push<u32>(0); |
| 85 | rb.PushCopyObjects(event); | ||
| 86 | } | 85 | } |
| 87 | 86 | ||
| 88 | void NVDRV::SetClientPID(Kernel::HLERequestContext& ctx) { | 87 | void NVDRV::SetClientPID(Kernel::HLERequestContext& ctx) { |
| @@ -113,6 +112,8 @@ NVDRV::NVDRV(std::shared_ptr<Module> nvdrv, const char* name) | |||
| 113 | {13, &NVDRV::FinishInitialize, "FinishInitialize"}, | 112 | {13, &NVDRV::FinishInitialize, "FinishInitialize"}, |
| 114 | }; | 113 | }; |
| 115 | RegisterHandlers(functions); | 114 | RegisterHandlers(functions); |
| 115 | |||
| 116 | query_event = Kernel::Event::Create(Kernel::ResetType::OneShot, "NVDRV::query_event"); | ||
| 116 | } | 117 | } |
| 117 | 118 | ||
| 118 | } // namespace Nvidia | 119 | } // namespace Nvidia |
diff --git a/src/core/hle/service/nvdrv/interface.h b/src/core/hle/service/nvdrv/interface.h index 8c4b068c2..daf2302af 100644 --- a/src/core/hle/service/nvdrv/interface.h +++ b/src/core/hle/service/nvdrv/interface.h | |||
| @@ -6,6 +6,7 @@ | |||
| 6 | 6 | ||
| 7 | #include <memory> | 7 | #include <memory> |
| 8 | #include <string> | 8 | #include <string> |
| 9 | #include "core/hle/kernel/event.h" | ||
| 9 | #include "core/hle/service/nvdrv/nvdrv.h" | 10 | #include "core/hle/service/nvdrv/nvdrv.h" |
| 10 | #include "core/hle/service/service.h" | 11 | #include "core/hle/service/service.h" |
| 11 | 12 | ||
| @@ -29,6 +30,8 @@ private: | |||
| 29 | std::shared_ptr<Module> nvdrv; | 30 | std::shared_ptr<Module> nvdrv; |
| 30 | 31 | ||
| 31 | u64 pid{}; | 32 | u64 pid{}; |
| 33 | |||
| 34 | Kernel::SharedPtr<Kernel::Event> query_event; | ||
| 32 | }; | 35 | }; |
| 33 | 36 | ||
| 34 | } // namespace Nvidia | 37 | } // namespace Nvidia |