mirror of
https://repo.dec05eba.com/gpu-screen-recorder
synced 2026-03-31 09:07:13 +09:00
Unset DRI_PRIME as well when gpu offloading cant be used
This commit is contained in:
@@ -1894,7 +1894,7 @@ static bool is_xwayland(Display *display) {
|
|||||||
|
|
||||||
static bool is_using_prime_run() {
|
static bool is_using_prime_run() {
|
||||||
const char *prime_render_offload = getenv("__NV_PRIME_RENDER_OFFLOAD");
|
const char *prime_render_offload = getenv("__NV_PRIME_RENDER_OFFLOAD");
|
||||||
return prime_render_offload && strcmp(prime_render_offload, "1") == 0;
|
return (prime_render_offload && strcmp(prime_render_offload, "1") == 0) || getenv("DRI_PRIME");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void disable_prime_run() {
|
static void disable_prime_run() {
|
||||||
@@ -1902,6 +1902,7 @@ static void disable_prime_run() {
|
|||||||
unsetenv("__NV_PRIME_RENDER_OFFLOAD_PROVIDER");
|
unsetenv("__NV_PRIME_RENDER_OFFLOAD_PROVIDER");
|
||||||
unsetenv("__GLX_VENDOR_LIBRARY_NAME");
|
unsetenv("__GLX_VENDOR_LIBRARY_NAME");
|
||||||
unsetenv("__VK_LAYER_NV_optimus");
|
unsetenv("__VK_LAYER_NV_optimus");
|
||||||
|
unsetenv("DRI_PRIME");
|
||||||
}
|
}
|
||||||
|
|
||||||
static gsr_window* gsr_window_create(Display *display, bool wayland) {
|
static gsr_window* gsr_window_create(Display *display, bool wayland) {
|
||||||
|
|||||||
Reference in New Issue
Block a user