diff options
author | Streetwalrus Einstein <streetwalrus@codewalr.us> | 2015-12-14 18:13:44 +0200 |
---|---|---|
committer | Streetwalrus Einstein <streetwalrus@codewalr.us> | 2015-12-14 18:13:44 +0200 |
commit | 774ffbe0d5eff86710fc8d219871d181f6927c04 (patch) | |
tree | 0e7216b658919cb4332bca7a1126737ce42af004 /sway/main.c | |
parent | b65e3482333f28d436a478a9e16157cb8f822cfc (diff) |
Detect proprietary AMD drivers too
Diffstat (limited to 'sway/main.c')
-rw-r--r-- | sway/main.c | 9 |
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) { } } -void detect_nvidia() { +void detect_proprietary() { FILE *f = fopen("/proc/modules", "r"); if (!f) { return; @@ -48,6 +48,11 @@ void detect_nvidia() { free(line); break; } + if (strstr(line, "fglrx")) { + fprintf(stderr, "\x1B[1;31mWarning: Proprietary AMD drivers do NOT support Wayland. Use radeon.\x1B[0m\n"); + free(line); + break; + } free(line); } fclose(f); @@ -161,7 +166,7 @@ int main(int argc, char **argv) { } setenv("WLC_DIM", "0", 0); wlc_log_set_handler(wlc_log_handler); - detect_nvidia(); + detect_proprietary(); /* Changing code earlier than this point requires detailed review */ /* (That code runs as root on systems without logind, and wlc_init drops to |