]> git.zerfleddert.de Git - proxmark3-svn/commitdiff
Don't try to display the GUI when running in textmode (#387)
authoruzlonewolf <github_com@hacker-nin.com>
Sun, 27 Aug 2017 10:09:39 +0000 (03:09 -0700)
committerpwpiwi <pwpiwi@users.noreply.github.com>
Sun, 27 Aug 2017 10:09:39 +0000 (12:09 +0200)
* Don't try to display the GUI when running in textmode

* Updated textmode fix to always run the GUI under Windows

client/proxmark3.c

index fa389dd1678d35afd13def5ce2960961b88b1591..956eb6a823743de2fa61b973e25f0d5ff6b95e9a 100644 (file)
@@ -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 
Impressum, Datenschutz