aboutsummaryrefslogtreecommitdiff
path: root/src/cuda.c
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2023-03-31 01:11:12 +0200
committerdec05eba <dec05eba@protonmail.com>2023-03-31 01:11:12 +0200
commit82e37200849935beac7213877b526aeaf2170274 (patch)
tree9d972659f2e5b171a978e7b64137443b17aa87de /src/cuda.c
parentf57b641d6db6513d16eb1aef4fcc444a102b6245 (diff)
Install coolbits if using nvidia, add preserve video memory install script
Diffstat (limited to 'src/cuda.c')
-rw-r--r--src/cuda.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/cuda.c b/src/cuda.c
index 470747b..ea14e8b 100644
--- a/src/cuda.c
+++ b/src/cuda.c
@@ -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));
}