diff options
Diffstat (limited to 'src/cuda.c')
-rw-r--r-- | src/cuda.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -94,6 +94,11 @@ bool gsr_cuda_load(gsr_cuda *self, Display *display, bool do_overclock) { } void gsr_cuda_unload(gsr_cuda *self) { + if(self->do_overclock && self->overclock.xnvctrl.library) { + gsr_overclock_stop(&self->overclock); + gsr_overclock_unload(&self->overclock); + } + if(self->library) { if(self->cu_ctx) { self->cuCtxDestroy_v2(self->cu_ctx); @@ -102,10 +107,5 @@ void gsr_cuda_unload(gsr_cuda *self) { dlclose(self->library); } - if(self->do_overclock && self->overclock.xnvctrl.library) { - gsr_overclock_stop(&self->overclock); - gsr_overclock_unload(&self->overclock); - } - memset(self, 0, sizeof(gsr_cuda)); } |