diff util.h @ 2703:829205a9647a default tip

Pump events and allow debug window interaction while paused in CPU debugger on Windows
author Michael Pavone <pavone@retrodev.com>
date Fri, 04 Jul 2025 21:24:15 -0700
parents 143cb5762ec9
children
line wrap: on
line diff
--- a/util.h	Fri Jul 04 21:23:48 2025 -0700
+++ b/util.h	Fri Jul 04 21:24:15 2025 -0700
@@ -108,6 +108,8 @@
 int socket_last_error(void);
 //Returns if the last socket error was EAGAIN/EWOULDBLOCK
 int socket_error_is_wouldblock(void);
+//works like fgets, but calls timeout_cb every timeout_usec microseconds while waiting for input
+char *fgets_timeout(char *dst, size_t size, FILE *f, uint64_t timeout_usec, void (*timeout_cb)(void));
 #if defined(__ANDROID__) && !defined(IS_LIB)
 FILE* fopen_wrapper(const char *path, const char *mode);
 #ifndef DISABLE_ZLIB