Skip to content
Snippets Groups Projects
Commit ce925f97 authored by deuce's avatar deuce
Browse files

Add more verbose X failure messages...

parent ccf2879c
No related branches found
No related tags found
No related merge requests found
...@@ -1103,6 +1103,7 @@ init_mode(int mode) ...@@ -1103,6 +1103,7 @@ init_mode(int mode)
idx = find_vmode(mode & 0x7f); idx = find_vmode(mode & 0x7f);
if (idx == -1 || vmodelist[idx].type == NOMODE) { if (idx == -1 || vmodelist[idx].type == NOMODE) {
fprintf(stderr,"Cannot initialize selected mode\n");
return(-1); return(-1);
} }
vmode = vmodelist[idx]; vmode = vmodelist[idx];
...@@ -1131,8 +1132,10 @@ init_mode(int mode) ...@@ -1131,8 +1132,10 @@ init_mode(int mode)
/* Update font. */ /* Update font. */
xfont = vmode.fontname; xfont = vmode.fontname;
if(load_font()) if(load_font()) {
fprintf(stderr,"Cannot load ``%s'' font\n",xfont);
return(-1); return(-1);
}
/* Resize window if necessary. */ /* Resize window if necessary. */
resize_window(); resize_window();
...@@ -1174,6 +1177,7 @@ init_window() ...@@ -1174,6 +1177,7 @@ init_window()
dpy = XOpenDisplay(NULL); dpy = XOpenDisplay(NULL);
if (dpy == NULL) { if (dpy == NULL) {
fprintf(stderr,"Cannot open connection to X server\n");
return(-1); return(-1);
} }
xfd = ConnectionNumber(dpy); xfd = ConnectionNumber(dpy);
...@@ -1257,12 +1261,18 @@ console_init() ...@@ -1257,12 +1261,18 @@ console_init()
if(dpy!=NULL) if(dpy!=NULL)
return(0); return(0);
if(kbd_init()) if(kbd_init()) {
fprintf(stderr,"Cannot initialize X keyboard\n");
return(-1); return(-1);
if(video_init()) }
if(video_init()) {
fprintf(stderr,"X video init failure\n");
return(-1); return(-1);
if(mouse_init()) }
if(mouse_init()) {
fprintf(stderr,"Cannot initialize X mouse\n");
return(-1); return(-1);
}
_beginthread(video_async_event,1<<16,NULL); _beginthread(video_async_event,1<<16,NULL);
return(0); return(0);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment