X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/c4809fd411a00e9d0ce2b7ad62dc9a19a9c7a89d..af1940a5d87829c26ee17026bac43e3d8971d6f7:/client/graph.c?ds=inline diff --git a/client/graph.c b/client/graph.c index cc0ec6fb..3ea47d2d 100644 --- a/client/graph.c +++ b/client/graph.c @@ -53,16 +53,19 @@ int ClearGraph(int redraw) void save_restoreGB(uint8_t saveOpt) { static int SavedGB[MAX_GRAPH_TRACE_LEN]; - static int SavedGBlen; + static int SavedGBlen=0; static bool GB_Saved = false; + static int SavedGridOffsetAdj=0; - if (saveOpt==1) { //save + if (saveOpt == GRAPH_SAVE) { //save memcpy(SavedGB, GraphBuffer, sizeof(GraphBuffer)); SavedGBlen = GraphTraceLen; GB_Saved=true; - } else if (GB_Saved){ //restore + SavedGridOffsetAdj = GridOffset; + } else if (GB_Saved) { //restore memcpy(GraphBuffer, SavedGB, sizeof(GraphBuffer)); GraphTraceLen = SavedGBlen; + GridOffset = SavedGridOffsetAdj; RepaintGraphWindow(); } return;