--- hatari/src/includes/main.h 2019/04/09 08:54:26 1.1.1.25 +++ hatari/src/includes/main.h 2019/04/09 08:59:22 1.1.1.28 @@ -19,6 +19,10 @@ #include #include +#if defined(_MSC_VER) +#include "vs-fix.h" +#endif + #if __GNUC__ >= 3 # define likely(x) __builtin_expect (!!(x), 1) # define unlikely(x) __builtin_expect (!!(x), 0) @@ -27,6 +31,13 @@ # define unlikely(x) (x) #endif +/* avoid warnings with variables used only in asserts */ +#ifdef NDEBUG +# define ASSERT_VARIABLE(x) (void)(x) +#else +# define ASSERT_VARIABLE(x) assert(x) +#endif + #ifdef WIN32 #define PATHSEP '\\' #else @@ -35,8 +46,8 @@ #define CALL_VAR(func) { ((void(*)(void))func)(); } -#ifndef ARRAYSIZE -#define ARRAYSIZE(x) (int)(sizeof(x)/sizeof(x[0])) +#ifndef ARRAY_SIZE +#define ARRAY_SIZE(x) (int)(sizeof(x)/sizeof(x[0])) #endif /* 68000 operand sizes */ @@ -52,10 +63,11 @@ extern bool bQuitProgram; extern bool Main_PauseEmulation(bool visualize); extern bool Main_UnPauseEmulation(void); extern void Main_RequestQuit(int exitval); -extern void Main_SetRunVBLs(Uint32 vbls); -extern bool Main_SetVBLSlowdown(int factor); +extern void Main_SetQuitValue(int exitval); +extern Uint32 Main_SetRunVBLs(Uint32 vbls); +extern const char* Main_SetVBLSlowdown(int factor); extern void Main_WaitOnVbl(void); -extern void Main_WarpMouse(int x, int y); +extern void Main_WarpMouse(int x, int y, bool restore); extern void Main_EventHandler(void); extern void Main_SetTitle(const char *title);