diff options
author | Leandro A. F. Pereira <leandro@hardinfo.org> | 2006-11-19 19:38:31 +0000 |
---|---|---|
committer | Leandro A. F. Pereira <leandro@hardinfo.org> | 2006-11-19 19:38:31 +0000 |
commit | 5e7c1a3a03269b5088b26ecf9c676518d65a05e4 (patch) | |
tree | d4b9b5c0731a252954a897892633d1f7f6c8fbc4 /hardinfo2/arch/common | |
parent | 8708504c28caeee4bd3e95b6b6d739970863f19c (diff) |
Run hardinfo with the '-r' command-line parameter and you'll get a report in standard output. :)
Diffstat (limited to 'hardinfo2/arch/common')
-rw-r--r-- | hardinfo2/arch/common/display.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/hardinfo2/arch/common/display.h b/hardinfo2/arch/common/display.h index 6731e3e3..b28d34cc 100644 --- a/hardinfo2/arch/common/display.h +++ b/hardinfo2/arch/common/display.h @@ -126,9 +126,13 @@ computer_get_display(void) DisplayInfo *di = g_new0(DisplayInfo, 1); GdkScreen *screen = gdk_screen_get_default(); - - di->width = gdk_screen_get_width(screen); - di->height = gdk_screen_get_height(screen); + + if (screen) { + di->width = gdk_screen_get_width(screen); + di->height = gdk_screen_get_height(screen); + } else { + di->width = di->height = 0; + } get_glx_info(di); get_x11_info(di); |