From: uzlonewolf Date: Sun, 27 Aug 2017 10:09:39 +0000 (-0700) Subject: Don't try to display the GUI when running in textmode (#387) X-Git-Tag: v3.1.0~173 X-Git-Url: http://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/commitdiff_plain/c6c0449105c42313aac33e2dd619187a6d1cec8d?ds=sidebyside Don't try to display the GUI when running in textmode (#387) * Don't try to display the GUI when running in textmode * Updated textmode fix to always run the GUI under Windows --- diff --git a/client/proxmark3.c b/client/proxmark3.c index fa389dd1..956eb6a8 100644 --- a/client/proxmark3.c +++ b/client/proxmark3.c @@ -274,8 +274,22 @@ int main(int argc, char* argv[]) { pthread_mutex_init(&print_lock, NULL); #ifdef HAVE_GUI +#ifdef _WIN32 InitGraphics(argc, argv, script_cmds_file, usb_present); MainGraphics(); +#else + char* display = getenv("DISPLAY"); + + if (display && strlen(display) > 1) + { + InitGraphics(argc, argv, script_cmds_file, usb_present); + MainGraphics(); + } + else + { + main_loop(script_cmds_file, usb_present); + } +#endif #else main_loop(script_cmds_file, usb_present); #endif