This commit is contained in:
plutooo 2018-03-25 17:47:52 +02:00 committed by fincs
parent a3a2e57fc2
commit de93886c56
3 changed files with 8 additions and 6 deletions

View File

@ -9,5 +9,5 @@ typedef struct NvGpu {
NvErrorNotifier error_notifier;
} NvGpu;
Result nvgpuCreate(NvGpu* g);
void nvgpuClose(NvGpu* g);
Result nvGpuCreate(NvGpu* g);
void nvGpuClose(NvGpu* g);

View File

@ -1,6 +1,6 @@
#include <switch.h>
Result nvgpuCreate(NvGpu* g)
Result nvGpuCreate(NvGpu* g)
{
Result rc;
@ -42,12 +42,12 @@ Result nvgpuCreate(NvGpu* g)
rc = nvZcullContextCreate(&g->zcull_ctx, g);
if (R_FAILED(rc))
nvgpuClose(g);
nvGpuClose(g);
return rc;
}
void nvgpuClose(NvGpu* g)
void nvGpuClose(NvGpu* g)
{
nvBufferExit();
nvInfoExit();

View File

@ -14,10 +14,12 @@ Result nvioctlNvhostCtrl_SyncptRead(u32 fd, u32 id, u32* out)
memset(&data, 0, sizeof(data));
data.syncpt_id = id;
Result rc;
rc = nvIoctl(fd, _NV_IOWR(0x00, 0x14, data), &data);
if (R_SUCCEEDED(rc)) {
*out = value;
*out = data.value;
}
return rc;