Merge branch 'master' into ios_tmp

* master:
  fix issue on macos x
This commit is contained in:
Carlos Aragones 2020-04-26 17:44:52 +02:00
commit 5981107bdd
5 changed files with 14 additions and 6 deletions

View File

@ -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);
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

View File

@ -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";
}

View File

@ -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)

View File

@ -1,3 +1,5 @@
#if defined(__linux__)
#include <time.h>
#include <MiniFB.h>
@ -30,3 +32,6 @@ mfb_timer_init() {
}
g_timer_resolution = 1.0 / g_timer_frequency;
}
#endif

View File

@ -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