From 93a29403d334c8dd1253221fd4588209a706f500 Mon Sep 17 00:00:00 2001 From: Michael Pavone Date: Thu, 28 May 2015 22:31:21 -0700 Subject: Get windows build compiling again post-merge --- debug.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'debug.c') diff --git a/debug.c b/debug.c index ac5c34d..6ff8917 100644 --- a/debug.c +++ b/debug.c @@ -3,7 +3,9 @@ #include "68kinst.h" #include #include +#ifndef _WIN32 #include +#endif #include "render.h" static bp_def * breakpoints = NULL; @@ -510,16 +512,21 @@ m68k_context * debugger(m68k_context * context, uint32_t address) printf("%X: %s\n", address, input_buf); uint32_t after = address + (after_pc-pc)*2; int debugging = 1; +#ifdef _WIN32 +#define prompt 1 +#else int prompt = 1; fd_set read_fds; FD_ZERO(&read_fds); struct timeval timeout; +#endif while (debugging) { if (prompt) { fputs(">", stdout); fflush(stdout); } process_events(); +#ifndef _WIN32 timeout.tv_sec = 0; timeout.tv_usec = 16667; FD_SET(fileno(stdin), &read_fds); @@ -529,6 +536,7 @@ m68k_context * debugger(m68k_context * context, uint32_t address) } else { prompt = 1; } +#endif if (!fgets(input_buf, sizeof(input_buf), stdin)) { fputs("fgets failed", stderr); break; -- cgit v1.2.3