mirror of
https://repo.dec05eba.com/gpu-screen-recorder
synced 2026-05-06 06:50:43 +09:00
Disable steam deck support at the moment because the driver is broken (ignores qp, capture tearing)
This commit is contained in:
@@ -1,6 +1,8 @@
|
|||||||
#ifndef GSR_DEFS_H
|
#ifndef GSR_DEFS_H
|
||||||
#define GSR_DEFS_H
|
#define GSR_DEFS_H
|
||||||
|
|
||||||
|
#include <stdbool.h>
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
GSR_GPU_VENDOR_AMD,
|
GSR_GPU_VENDOR_AMD,
|
||||||
GSR_GPU_VENDOR_INTEL,
|
GSR_GPU_VENDOR_INTEL,
|
||||||
@@ -10,6 +12,7 @@ typedef enum {
|
|||||||
typedef struct {
|
typedef struct {
|
||||||
gsr_gpu_vendor vendor;
|
gsr_gpu_vendor vendor;
|
||||||
int gpu_version; /* 0 if unknown */
|
int gpu_version; /* 0 if unknown */
|
||||||
|
bool is_known_broken_driver;
|
||||||
} gsr_gpu_info;
|
} gsr_gpu_info;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
|
|||||||
10
src/main.cpp
10
src/main.cpp
@@ -1843,6 +1843,11 @@ static void info_command() {
|
|||||||
_exit(22);
|
_exit(22);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(egl.gpu_info.is_known_broken_driver) {
|
||||||
|
fprintf(stderr, "gsr error: recording is not supported on your device because your device has broken drivers\n");
|
||||||
|
_exit(14);
|
||||||
|
}
|
||||||
|
|
||||||
egl.card_path[0] = '\0';
|
egl.card_path[0] = '\0';
|
||||||
if(monitor_capture_use_drm(&egl, wayland)) {
|
if(monitor_capture_use_drm(&egl, wayland)) {
|
||||||
// TODO: Allow specifying another card, and in other places
|
// TODO: Allow specifying another card, and in other places
|
||||||
@@ -2758,6 +2763,11 @@ int main(int argc, char **argv) {
|
|||||||
_exit(1);
|
_exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(egl.gpu_info.is_known_broken_driver) {
|
||||||
|
fprintf(stderr, "gsr error: recording is not supported on your device because your device has broken drivers\n");
|
||||||
|
_exit(14);
|
||||||
|
}
|
||||||
|
|
||||||
bool very_old_gpu = false;
|
bool very_old_gpu = false;
|
||||||
|
|
||||||
if(egl.gpu_info.vendor == GSR_GPU_VENDOR_NVIDIA && egl.gpu_info.gpu_version != 0 && egl.gpu_info.gpu_version < 900) {
|
if(egl.gpu_info.vendor == GSR_GPU_VENDOR_NVIDIA && egl.gpu_info.gpu_version != 0 && egl.gpu_info.gpu_version < 900) {
|
||||||
|
|||||||
@@ -377,6 +377,7 @@ bool gl_get_gpu_info(gsr_egl *egl, gsr_gpu_info *info) {
|
|||||||
const unsigned char *gl_renderer = egl->glGetString(GL_RENDERER);
|
const unsigned char *gl_renderer = egl->glGetString(GL_RENDERER);
|
||||||
|
|
||||||
info->gpu_version = 0;
|
info->gpu_version = 0;
|
||||||
|
info->is_known_broken_driver = false;
|
||||||
|
|
||||||
if(!gl_vendor) {
|
if(!gl_vendor) {
|
||||||
fprintf(stderr, "gsr error: failed to get gpu vendor\n");
|
fprintf(stderr, "gsr error: failed to get gpu vendor\n");
|
||||||
@@ -409,6 +410,7 @@ bool gl_get_gpu_info(gsr_egl *egl, gsr_gpu_info *info) {
|
|||||||
if(gl_renderer) {
|
if(gl_renderer) {
|
||||||
if(info->vendor == GSR_GPU_VENDOR_NVIDIA)
|
if(info->vendor == GSR_GPU_VENDOR_NVIDIA)
|
||||||
sscanf((const char*)gl_renderer, "%*s %*s %*s %d", &info->gpu_version);
|
sscanf((const char*)gl_renderer, "%*s %*s %*s %d", &info->gpu_version);
|
||||||
|
info->is_known_broken_driver = strstr((const char*)gl_renderer, "vangogh") != NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
end:
|
end:
|
||||||
|
|||||||
Reference in New Issue
Block a user