aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--com.dec05eba.gpu_screen_recorder.appdata.xml8
-rw-r--r--meson.build2
-rw-r--r--project.conf2
-rw-r--r--src/main.cpp15
4 files changed, 23 insertions, 4 deletions
diff --git a/com.dec05eba.gpu_screen_recorder.appdata.xml b/com.dec05eba.gpu_screen_recorder.appdata.xml
index dd49401..b766d88 100644
--- a/com.dec05eba.gpu_screen_recorder.appdata.xml
+++ b/com.dec05eba.gpu_screen_recorder.appdata.xml
@@ -80,6 +80,14 @@
</screenshots>
<releases>
+ <release version="4.1.5" date="2024-08-20">
+ <description>
+ <ul>
+ <li>Disable support for steam deck at the moment because steam deck drivers are broken</li>
+ <li>Improve quality again</li>
+ </ul>
+ </description>
+ </release>
<release version="4.1.4" date="2024-08-20">
<description>
<ul>
diff --git a/meson.build b/meson.build
index 50d1127..d3bf982 100644
--- a/meson.build
+++ b/meson.build
@@ -1,4 +1,4 @@
-project('gpu-screen-recorder-gtk', ['c', 'cpp'], version : '4.1.4', default_options : ['warning_level=2'])
+project('gpu-screen-recorder-gtk', ['c', 'cpp'], version : '4.1.5', default_options : ['warning_level=2'])
add_project_arguments('-Wshadow', language : ['c', 'cpp'])
if get_option('buildtype') == 'debug'
diff --git a/project.conf b/project.conf
index 722f7a6..92b72d1 100644
--- a/project.conf
+++ b/project.conf
@@ -1,7 +1,7 @@
[package]
name = "gpu-screen-recorder-gtk"
type = "executable"
-version = "4.1.4"
+version = "4.1.5"
platforms = ["posix"]
[config]
diff --git a/src/main.cpp b/src/main.cpp
index ae04461..a9732cf 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -264,6 +264,7 @@ static GsrInfo gsr_info;
enum class GsrInfoExitStatus {
OK,
+ BROKEN_DRIVERS,
FAILED_TO_RUN_COMMAND,
OPENGL_FAILED,
NO_DRM_CARD
@@ -514,14 +515,14 @@ static std::vector<AudioInput> get_audio_devices() {
FILE *f = popen("gpu-screen-recorder --list-audio-devices", "r");
if(!f) {
- fprintf(stderr, "error: 'gpu-screen-recorder --info' failed\n");
+ fprintf(stderr, "error: 'gpu-screen-recorder --list-audio-devices' failed\n");
return inputs;
}
char output[16384];
ssize_t bytes_read = fread(output, 1, sizeof(output) - 1, f);
if(bytes_read < 0 || ferror(f)) {
- fprintf(stderr, "error: failed to read 'gpu-screen-recorder --info' output\n");
+ fprintf(stderr, "error: failed to read 'gpu-screen-recorder --list-audio-devices' output\n");
pclose(f);
return inputs;
}
@@ -2494,6 +2495,7 @@ static GsrInfoExitStatus get_gpu_screen_recorder_info(GsrInfo *_gsr_info) {
if(WIFEXITED(status)) {
switch(WEXITSTATUS(status)) {
case 0: return GsrInfoExitStatus::OK;
+ case 14: return GsrInfoExitStatus::BROKEN_DRIVERS;
case 22: return GsrInfoExitStatus::OPENGL_FAILED;
case 23: return GsrInfoExitStatus::NO_DRM_CARD;
default: return GsrInfoExitStatus::FAILED_TO_RUN_COMMAND;
@@ -3806,6 +3808,15 @@ static void activate(GtkApplication *app, gpointer) {
return;
}
+ if(gsr_info_exit_status == GsrInfoExitStatus::BROKEN_DRIVERS) {
+ GtkWidget *dialog = gtk_message_dialog_new(NULL, GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK,
+ "GPU Screen Recorder has been disabled for your device at the moment because your device has broken drivers.");
+ gtk_dialog_run(GTK_DIALOG(dialog));
+ gtk_widget_destroy(dialog);
+ g_application_quit(G_APPLICATION(app));
+ return;
+ }
+
if(gsr_info.system_info.display_server == DisplayServer::UNKNOWN) {
GtkWidget *dialog = gtk_message_dialog_new(NULL, GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK,
"Neither X11 nor Wayland is running.");