diff --git a/include/MiniFB.h b/include/MiniFB.h index a32c771..1e6c5a4 100644 --- a/include/MiniFB.h +++ b/include/MiniFB.h @@ -59,13 +59,13 @@ const uint8_t * mfb_get_key_buffer(struct mfb_window *window); // O void mfb_set_target_fps(uint32_t fps); bool mfb_wait_sync(struct mfb_window *window); -struct mfb_timer * mfb_timer_create(); +struct mfb_timer * mfb_timer_create(void); void mfb_timer_destroy(struct mfb_timer *tmr); void mfb_timer_reset(struct mfb_timer *tmr); double mfb_timer_now(struct mfb_timer *tmr); double mfb_timer_delta(struct mfb_timer *tmr); -double mfb_timer_get_frequency(); -double mfb_timer_get_resolution(); +double mfb_timer_get_frequency(void); +double mfb_timer_get_resolution(void); /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/src/MiniFB_common.c b/src/MiniFB_common.c index b6e1aca..f3c009b 100755 --- a/src/MiniFB_common.c +++ b/src/MiniFB_common.c @@ -565,6 +565,9 @@ mfb_get_key_name(mfb_key key) { case KB_KEY_MENU: return "Menu"; + case KB_KEY_UNKNOWN: + return "Unknown"; } + return "Unknown"; } diff --git a/src/MiniFB_internal.h b/src/MiniFB_internal.h index af30627..7ba4062 100755 --- a/src/MiniFB_internal.h +++ b/src/MiniFB_internal.h @@ -18,7 +18,7 @@ extern "C" { #endif extern short int g_keycodes[512]; - void init_keycodes(); + void init_keycodes(void); void keyboard_default(struct mfb_window *window, mfb_key key, mfb_key_mod mod, bool isPressed); #if defined(__cplusplus) diff --git a/src/MiniFB_linux.c b/src/MiniFB_linux.c index 9fa406c..5d6611d 100644 --- a/src/MiniFB_linux.c +++ b/src/MiniFB_linux.c @@ -1,3 +1,5 @@ +#if defined(__linux__) + #include #include @@ -30,3 +32,6 @@ mfb_timer_init() { } g_timer_resolution = 1.0 / g_timer_frequency; } + +#endif + diff --git a/src/MiniFB_timer.c b/src/MiniFB_timer.c index f1a9946..f032b28 100644 --- a/src/MiniFB_timer.c +++ b/src/MiniFB_timer.c @@ -8,8 +8,8 @@ double g_timer_resolution; double g_time_for_frame = 1.0 / 60.0; //------------------------------------- -extern uint64_t mfb_timer_tick(); -extern void mfb_timer_init(); +extern uint64_t mfb_timer_tick(void); +extern void mfb_timer_init(void); //------------------------------------- void