aboutsummaryrefslogtreecommitdiffstats
path: root/sway/main.c
diff options
context:
space:
mode:
authorLibravatar Streetwalrus Einstein <streetwalrus@codewalr.us>2015-12-14 18:13:44 +0200
committerLibravatar Streetwalrus Einstein <streetwalrus@codewalr.us>2015-12-14 18:13:44 +0200
commit774ffbe0d5eff86710fc8d219871d181f6927c04 (patch)
tree0e7216b658919cb4332bca7a1126737ce42af004 /sway/main.c
parentFix crash in bar { } blocks (diff)
downloadsway-774ffbe0d5eff86710fc8d219871d181f6927c04.tar.gz
sway-774ffbe0d5eff86710fc8d219871d181f6927c04.tar.zst
sway-774ffbe0d5eff86710fc8d219871d181f6927c04.zip
Detect proprietary AMD drivers too
Diffstat (limited to 'sway/main.c')
-rw-r--r--sway/main.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/sway/main.c b/sway/main.c
index 9a5e351c..382e7ca2 100644
--- a/sway/main.c
+++ b/sway/main.c
@@ -36,7 +36,7 @@ static void wlc_log_handler(enum wlc_log_type type, const char *str) {
36 } 36 }
37} 37}
38 38
39void detect_nvidia() { 39void detect_proprietary() {
40 FILE *f = fopen("/proc/modules", "r"); 40 FILE *f = fopen("/proc/modules", "r");
41 if (!f) { 41 if (!f) {
42 return; 42 return;
@@ -48,6 +48,11 @@ void detect_nvidia() {
48 free(line); 48 free(line);
49 break; 49 break;
50 } 50 }
51 if (strstr(line, "fglrx")) {
52 fprintf(stderr, "\x1B[1;31mWarning: Proprietary AMD drivers do NOT support Wayland. Use radeon.\x1B[0m\n");
53 free(line);
54 break;
55 }
51 free(line); 56 free(line);
52 } 57 }
53 fclose(f); 58 fclose(f);
@@ -161,7 +166,7 @@ int main(int argc, char **argv) {
161 } 166 }
162 setenv("WLC_DIM", "0", 0); 167 setenv("WLC_DIM", "0", 0);
163 wlc_log_set_handler(wlc_log_handler); 168 wlc_log_set_handler(wlc_log_handler);
164 detect_nvidia(); 169 detect_proprietary();
165 170
166 /* Changing code earlier than this point requires detailed review */ 171 /* Changing code earlier than this point requires detailed review */
167 /* (That code runs as root on systems without logind, and wlc_init drops to 172 /* (That code runs as root on systems without logind, and wlc_init drops to