diff --git a/nx/Makefile b/nx/Makefile index 48ee0d85..6987bcc7 100644 --- a/nx/Makefile +++ b/nx/Makefile @@ -24,7 +24,7 @@ VERSION := $(LIBNX_MAJOR).$(LIBNX_MINOR).$(LIBNX_PATCH) #--------------------------------------------------------------------------------- TARGET := nx #BUILD := build -SOURCES := source/arm source/kernel source/services source/nvidia source/nvidia/ioctl source/display source/audio source/runtime source/runtime/devices source/runtime/util/utf +SOURCES := source/arm source/kernel source/services source/nvidia source/nvidia/ioctl source/nvidia/gpu source/display source/audio source/runtime source/runtime/devices source/runtime/util/utf DATA := data INCLUDES := include external/bsd/include diff --git a/nx/include/switch.h b/nx/include/switch.h index 3b0035eb..28a750df 100644 --- a/nx/include/switch.h +++ b/nx/include/switch.h @@ -75,6 +75,7 @@ extern "C" { #include "switch/nvidia/buffer.h" #include "switch/nvidia/address_space.h" #include "switch/nvidia/channel.h" +#include "switch/nvidia/gpu/gpu.h" #include "switch/audio/driver.h" diff --git a/nx/include/switch/nvidia/gpu/gpu.h b/nx/include/switch/nvidia/gpu/gpu.h new file mode 100644 index 00000000..b699b1df --- /dev/null +++ b/nx/include/switch/nvidia/gpu/gpu.h @@ -0,0 +1,9 @@ +#pragma once + +typedef struct { + NvAddressSpace addr_space; + NvChannel gpu_channel; +} NvGpu; + +Result nvgpuCreate(NvGpu* g); +void nvgpuClose(NvGpu* g); diff --git a/nx/source/display/binder.c b/nx/source/display/binder.c index 9011c754..678c423e 100644 --- a/nx/source/display/binder.c +++ b/nx/source/display/binder.c @@ -68,7 +68,7 @@ Result binderInitSession(Binder* b, u32 unk0) return rc; } -void binderExitSession(Binder* b) +void binderClose(Binder* b) { if (!b->created) return; diff --git a/nx/source/nvidia/gpu/gpu.c b/nx/source/nvidia/gpu/gpu.c index 7ba6717c..726c0396 100644 --- a/nx/source/nvidia/gpu/gpu.c +++ b/nx/source/nvidia/gpu/gpu.c @@ -1,10 +1,5 @@ #include -typedef struct { - NvAddressSpace addr_space; - NvChannel gpu_channel; -} NvGpu; - Result nvgpuCreate(NvGpu* g) { Result rc; diff --git a/nx/source/nvidia/ioctl/channel.c b/nx/source/nvidia/ioctl/nvchannel.c similarity index 100% rename from nx/source/nvidia/ioctl/channel.c rename to nx/source/nvidia/ioctl/nvchannel.c