summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/nvdrv/interface.cpp
diff options
context:
space:
mode:
authorChloe Marcec <dmarcecguzman@gmail.com>2020-11-10 05:56:41 +0100
committerChloe Marcec <dmarcecguzman@gmail.com>2020-11-10 05:57:36 +0100
commitfc4d692c503ca11a9339f0464520caf88d8474de (patch)
tree50702eaa2142d8fc39a2d7fb24d09fbed846e577 /src/core/hle/service/nvdrv/interface.cpp
parentcore: Make nvservices more standardized (diff)
downloadyuzu-fc4d692c503ca11a9339f0464520caf88d8474de.tar
yuzu-fc4d692c503ca11a9339f0464520caf88d8474de.tar.gz
yuzu-fc4d692c503ca11a9339f0464520caf88d8474de.tar.bz2
yuzu-fc4d692c503ca11a9339f0464520caf88d8474de.tar.lz
yuzu-fc4d692c503ca11a9339f0464520caf88d8474de.tar.xz
yuzu-fc4d692c503ca11a9339f0464520caf88d8474de.tar.zst
yuzu-fc4d692c503ca11a9339f0464520caf88d8474de.zip
Diffstat (limited to '')
-rw-r--r--src/core/hle/service/nvdrv/interface.cpp17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/core/hle/service/nvdrv/interface.cpp b/src/core/hle/service/nvdrv/interface.cpp
index e01ef676a..f6c38e853 100644
--- a/src/core/hle/service/nvdrv/interface.cpp
+++ b/src/core/hle/service/nvdrv/interface.cpp
@@ -23,7 +23,7 @@ void NVDRV::SignalGPUInterruptSyncpt(const u32 syncpoint_id, const u32 value) {
void NVDRV::Open(Kernel::HLERequestContext& ctx) {
LOG_DEBUG(Service_NVDRV, "called");
- if (!initialized) {
+ if (!is_initialized) {
ServiceError(ctx, NvResult::NotInitialized);
LOG_ERROR(Service_NVDRV, "NvServices is not initalized!");
return;
@@ -51,7 +51,7 @@ void NVDRV::Ioctl1(Kernel::HLERequestContext& ctx) {
const auto command = rp.PopRaw<Ioctl>();
LOG_DEBUG(Service_NVDRV, "called fd={}, ioctl=0x{:08X}", fd, command.raw);
- if (!initialized) {
+ if (!is_initialized) {
ServiceError(ctx, NvResult::NotInitialized);
LOG_ERROR(Service_NVDRV, "NvServices is not initalized!");
return;
@@ -78,7 +78,7 @@ void NVDRV::Ioctl2(Kernel::HLERequestContext& ctx) {
const auto command = rp.PopRaw<Ioctl>();
LOG_DEBUG(Service_NVDRV, "called fd={}, ioctl=0x{:08X}", fd, command.raw);
- if (!initialized) {
+ if (!is_initialized) {
ServiceError(ctx, NvResult::NotInitialized);
LOG_ERROR(Service_NVDRV, "NvServices is not initalized!");
return;
@@ -106,7 +106,7 @@ void NVDRV::Ioctl3(Kernel::HLERequestContext& ctx) {
const auto command = rp.PopRaw<Ioctl>();
LOG_DEBUG(Service_NVDRV, "called fd={}, ioctl=0x{:08X}", fd, command.raw);
- if (!initialized) {
+ if (!is_initialized) {
ServiceError(ctx, NvResult::NotInitialized);
LOG_ERROR(Service_NVDRV, "NvServices is not initalized!");
return;
@@ -132,7 +132,7 @@ void NVDRV::Ioctl3(Kernel::HLERequestContext& ctx) {
void NVDRV::Close(Kernel::HLERequestContext& ctx) {
LOG_DEBUG(Service_NVDRV, "called");
- if (!initialized) {
+ if (!is_initialized) {
ServiceError(ctx, NvResult::NotInitialized);
LOG_ERROR(Service_NVDRV, "NvServices is not initalized!");
return;
@@ -150,7 +150,7 @@ void NVDRV::Close(Kernel::HLERequestContext& ctx) {
void NVDRV::Initialize(Kernel::HLERequestContext& ctx) {
LOG_WARNING(Service_NVDRV, "(STUBBED) called");
- initialized = true;
+ is_initialized = true;
IPC::ResponseBuilder rb{ctx, 3};
rb.Push(RESULT_SUCCESS);
@@ -163,14 +163,13 @@ void NVDRV::QueryEvent(Kernel::HLERequestContext& ctx) {
const auto event_id = rp.Pop<u32>() & 0x00FF;
LOG_WARNING(Service_NVDRV, "(STUBBED) called, fd={:X}, event_id={:X}", fd, event_id);
- if (!initialized) {
+ if (!is_initialized) {
ServiceError(ctx, NvResult::NotInitialized);
LOG_ERROR(Service_NVDRV, "NvServices is not initalized!");
return;
}
- auto nv_result = nvdrv->VerifyFd(fd);
-
+ const auto nv_result = nvdrv->VerifyFD(fd);
if (nv_result != NvResult::Success) {
LOG_ERROR(Service_NVDRV, "Invalid FD specified DeviceFD={}!", fd);
ServiceError(ctx, nv_result);