aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2024-07-26 10:49:19 +0200
committerdec05eba <dec05eba@protonmail.com>2024-07-26 10:49:19 +0200
commitba4d258c88b40e3ef174c750af4c7f0b84b744e0 (patch)
treeb1f3bcb66a3167f4ba4c93ae1ff652ed7d6405b9 /src
parent939323439665c2ec092ebb7cc0f5e13d2c91d2ca (diff)
Check gsr command exit status before output (makes sure to properly give opengl error warning)
Diffstat (limited to 'src')
-rw-r--r--src/main.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 85a2050..a57a403 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -3865,37 +3865,37 @@ static void activate(GtkApplication *app, gpointer) {
return;
}
- if(gsr_info.system_info.display_server == DisplayServer::UNKNOWN) {
+ if(gsr_info_exit_status == GsrInfoExitStatus::OPENGL_FAILED) {
GtkWidget *dialog = gtk_message_dialog_new(NULL, GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK,
- "Neither X11 nor Wayland is running.");
+ "Failed to get OpenGL information. Make sure your GPU drivers are properly installed. "
+ "If you are using nvidia then make sure to run \"flatpak update\" to make sure that your flatpak nvidia driver version matches your distros nvidia driver version. If this doesn't work then you might need to manually install a flatpak nvidia driver version that matches your distros nvidia driver version.");
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::X11 && !dpy) {
+ if(gsr_info_exit_status == GsrInfoExitStatus::NO_DRM_CARD) {
GtkWidget *dialog = gtk_message_dialog_new(NULL, GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK,
- "Failed to connect to X11 server");
+ "Failed to find a valid DRM card. If you are running GPU Screen Recorder with prime-run then try running without it.");
gtk_dialog_run(GTK_DIALOG(dialog));
gtk_widget_destroy(dialog);
g_application_quit(G_APPLICATION(app));
return;
}
- if(gsr_info_exit_status == GsrInfoExitStatus::OPENGL_FAILED) {
+ 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,
- "Failed to get OpenGL information. Make sure your GPU drivers are properly installed. "
- "If you are using nvidia then make sure to run \"flatpak update\" to make sure that your flatpak nvidia driver version matches your distros nvidia driver version. If this doesn't work then you might need to manually install a flatpak nvidia driver version that matches your distros nvidia driver version.");
+ "Neither X11 nor Wayland is running.");
gtk_dialog_run(GTK_DIALOG(dialog));
gtk_widget_destroy(dialog);
g_application_quit(G_APPLICATION(app));
return;
}
- if(gsr_info_exit_status == GsrInfoExitStatus::NO_DRM_CARD) {
+ if(gsr_info.system_info.display_server == DisplayServer::X11 && !dpy) {
GtkWidget *dialog = gtk_message_dialog_new(NULL, GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK,
- "Failed to find a valid DRM card. If you are running GPU Screen Recorder with prime-run then try running without it.");
+ "Failed to connect to X11 server");
gtk_dialog_run(GTK_DIALOG(dialog));
gtk_widget_destroy(dialog);
g_application_quit(G_APPLICATION(app));