minifb-zig-port/src/MiniFB_internal.h
Carlos Aragonés 35b8439b26
Add timers and ability to set a target fps for the application (#36)
* working on windows

* minor fix

* working on macosx

* Oops! I reversed resolution and frequency on macos

* working on X11

* working on wayland

* update the readme

* format the readme

Co-authored-by: Carlos Aragones <>
2020-04-22 13:00:15 +02:00

27 lines
628 B
C
Executable File

#pragma once
#include "MiniFB.h"
#include "MiniFB_enums.h"
#define kCall(func, ...) if(window_data && window_data->func) window_data->func((struct mfb_window *) window_data, __VA_ARGS__);
#define kUnused(var) (void) var;
typedef struct mfb_timer {
int64_t start_time;
int64_t delta_counter;
uint64_t time;
} mfb_timer;
#if defined(__cplusplus)
extern "C" {
#endif
extern short int g_keycodes[512];
void init_keycodes();
void keyboard_default(struct mfb_window *window, mfb_key key, mfb_key_mod mod, bool isPressed);
#if defined(__cplusplus)
}
#endif