]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - winsrc/gui.cpp
port adam's changes to add cursor pos in plot
[proxmark3-svn] / winsrc / gui.cpp
index cc8e17f9f499bac6a1fab30c8f01fc67e85930a7..0d2043cccd1f0ae2daf7b59abcf67f0b1ed433a0 100644 (file)
@@ -33,7 +33,6 @@ void dbp(char *str, ...)
 \r
 int GraphBuffer[MAX_GRAPH_TRACE_LEN];\r
 int GraphTraceLen;\r
-int offline; // Whether the GUI operates in Offline mode.\r
 \r
 HPEN GreyPen, GreenPen, WhitePen, YellowPen;\r
 HBRUSH GreenBrush, YellowBrush;\r
@@ -249,9 +248,9 @@ static void PaintGraph(HDC hdc)
        }\r
 \r
        char str[100];\r
-       sprintf(str, "@%d   max=%d min=%d mean=%d n=%d/%d    dt=%d [%.3f] zoom=%.3f",\r
+       sprintf(str, "@%d   max=%d min=%d mean=%d n=%d/%d    dt=%d [%.3f] zoom=%.3f CursorA=%d CursorB=%d",\r
                GraphStart, yMax, yMin, yMean, n, GraphTraceLen,\r
-               CursorBPos - CursorAPos, (CursorBPos - CursorAPos)/CursorScaleFactor, GraphPixelsPerPoint);\r
+               CursorBPos - CursorAPos, (CursorBPos - CursorAPos)/CursorScaleFactor, GraphPixelsPerPoint, CursorAPos, CursorBPos);\r
        TextOut(hdc, 50, r.bottom - 20, str, strlen(str));\r
 }\r
 \r
@@ -384,7 +383,7 @@ static void SetCommandEditTo(char *str)
        SendMessage(CommandEdit, EM_SETSEL, strlen(str), strlen(str));\r
 }\r
 \r
-void ShowGui(void)\r
+void ShowGui()\r
 {\r
        WNDCLASSEX wc;\r
        memset(&wc, 0, sizeof(wc));\r
@@ -505,9 +504,11 @@ void ShowGui(void)
                        }\r
                }\r
 \r
-               UsbCommand c;\r
-               if(ReceiveCommandPoll(&c)) {\r
-                       UsbCommandReceived(&c);\r
+               if (!offline)\r
+               {\r
+                       UsbCommand c;\r
+                       if(ReceiveCommandPoll(&c))\r
+                               UsbCommandReceived(&c);\r
                }\r
 \r
                Sleep(10);\r
Impressum, Datenschutz