Merge pull request #316 from Streetwalrus/fglrx

Detect proprietary AMD drivers too
master
Drew DeVault 9 years ago
commit 89025facbf

@ -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"); FILE *f = fopen("/proc/modules", "r");
if (!f) { if (!f) {
return; return;
@ -48,6 +48,11 @@ void detect_nvidia() {
free(line); free(line);
break; 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); free(line);
} }
fclose(f); fclose(f);
@ -161,7 +166,7 @@ int main(int argc, char **argv) {
} }
setenv("WLC_DIM", "0", 0); setenv("WLC_DIM", "0", 0);
wlc_log_set_handler(wlc_log_handler); wlc_log_set_handler(wlc_log_handler);
detect_nvidia(); detect_proprietary();
/* Changing code earlier than this point requires detailed review */ /* Changing code earlier than this point requires detailed review */
/* (That code runs as root on systems without logind, and wlc_init drops to /* (That code runs as root on systems without logind, and wlc_init drops to

Loading…
Cancel
Save