mirror of
https://github.com/switchbrew/libnx.git
synced 2025-06-21 12:32:40 +02:00
22 lines
417 B
C
22 lines
417 B
C
#include <switch.h>
|
|
|
|
Result nverrCreate(NvErrorNotifier* t, NvGpu* parent) {
|
|
Result rc;
|
|
|
|
rc = nvioctlChannel_SetErrorNotifier(parent->gpu_channel.fd, 1);
|
|
|
|
if (R_SUCCEEDED(rc)) {
|
|
t->parent = parent;
|
|
t->has_init = true;
|
|
}
|
|
|
|
return rc;
|
|
}
|
|
|
|
void nverrClose(NvErrorNotifier* t) {
|
|
if (!t->has_init)
|
|
return;
|
|
|
|
nvioctlChannel_SetErrorNotifier(t->parent->gpu_channel.fd, 0);
|
|
}
|