FIX: when running on ssh, client would fail. see https://github.com/Proxmark/proxmark3/pull/387 (thanks @uzlonewolf)

This commit is contained in:
iceman1001 2017-08-27 08:50:55 +02:00
commit 3764b02a2e

View file

@ -306,8 +306,21 @@ int main(int argc, char* argv[]) {
pthread_mutex_init(&print_lock, NULL); pthread_mutex_init(&print_lock, NULL);
#ifdef HAVE_GUI #ifdef HAVE_GUI
# if _WIN32
InitGraphics(argc, argv, script_cmds_file, usb_present); InitGraphics(argc, argv, script_cmds_file, usb_present);
MainGraphics(); MainGraphics();
# else
// for *nix distro's, check enviroment variable to verify a display
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 #else
main_loop(script_cmds_file, usb_present); main_loop(script_cmds_file, usb_present);
#endif #endif