shithub: m8c

Download patch

ref: 265b82b2484d01ad6b877cc93909a838bae9c319
parent: 0f9a123966b919ddfdc157b193446fdd4946d5d7
author: Jonne Kokkonen <jonne.kokkonen@gmail.com>
date: Tue May 4 12:06:25 EDT 2021

revert sleep changes in main.c

--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,6 @@
 *.o
+*.exe
 m8c
 .vscode
 font.c
+build/
--- a/main.c
+++ b/main.c
@@ -92,8 +92,8 @@
     // read serial port
     size_t bytes_read = sp_nonblocking_read(port, serial_buf, serial_read_size);
     if (bytes_read < 0) {
-      SDL_LogCritical(SDL_LOG_CATEGORY_ERROR, "Error %zu reading serial. \n",
-                      bytes_read);
+      SDL_LogCritical(SDL_LOG_CATEGORY_ERROR, "Error %d reading serial. \n",
+                      (int)bytes_read);
       run = 0;
     }
     if (bytes_read > 0) {
@@ -105,10 +105,12 @@
           SDL_LogError(SDL_LOG_CATEGORY_ERROR, "SLIP error %d\n", n);
         }
       }
+      usleep(10);
     } else {
       render_screen();
+      usleep(100);
     }
-    usleep(100);
+    
   }
 
   // exit, clean up
--