Commit Graph

16 Commits

Author SHA1 Message Date
Carlos Aragones
fb35e988ad Added mfb_get_target_fps 2021-04-28 12:36:40 +02:00
Carlos Aragones
fa8bf266f0 Changes related to dpi.
Introduced new function mfb_get_monitor_scale
Deprecated function mfb_get_monitor_dpi
2021-02-19 10:57:13 +01:00
Carlos Aragones
33f5084410 updated readme.md 2020-09-21 14:43:00 +02:00
Carlos Aragones
cfb114007e updated readme.md 2020-09-21 11:59:42 +02:00
Carlos Aragones
2be0d5a7e0 refactor iOS
added mfb_set_resize_callback to iOS
minor fixes on iOS & MacOS X
2020-05-17 18:31:00 +02:00
Carlos Aragones
ab5a7919a6 Updated readme 2020-04-26 18:40:46 +02:00
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
Carlos Aragonés
6b30baa7e4
Type prefixes (#34)
* update documentation

* Fix typo

* Added some examples

* changed window names

* Minor fix

* Added mfb_update_events to all platforms. Checked on Windows, X11 and Wayland

* simplify CMake

* Upgrade to CMake 3.5, simplify script and generalize it
Now the users only have to add_directory and link_libraries(minifb) in CMake

* Renamed typo scrool by scroll
Added some checks
Removed some warnings

* working Windows, X11 and Wayland

* fix issue 32

Co-authored-by: Carlos Aragones <>
Co-authored-by: caragones <carlos.aragonesmartinez-external@gemalto.com>
2020-03-06 07:06:54 +01:00
Carlos Aragonés
cdaa54f5d6 Direct mode (#23)
* update documentation

* Fix typo

* Added some examples

* changed window names

* Minor fix

* renamed callback setters (added _set_)
Direct / Poll Mode for asking events:
 bool            mfb_is_window_active(struct Window *window);
unsigned        mfb_get_window_width(struct Window *window);
unsigned        mfb_get_window_height(struct Window *window);
int             mfb_get_mouse_x(struct Window *window);            // Last mouse pos X
int             mfb_get_mouse_y(struct Window *window);            // Last mouse pos Y
float           mfb_get_mouse_scrool_x(struct Window *window);     // Mouse wheel X as a sum. When you call this function it resets.
float           mfb_get_mouse_scrool_y(struct Window *window);     // Mouse wheel Y as a sum. When you call this function it resets.
const uint8_t * mfb_get_mouse_button_buffer(struct Window *window);  // One byte for every button. Press (1), Release 0.
const uint8_t * mfb_get_key_buffer(struct Window *window);           // One byte for every key. Press (1), Release 0.

* Minor fixes

* Fixes related to mouse poll

* Minor fix on Win64
2019-11-14 16:18:42 +01:00
Carlos Aragonés
25a440f822 Update documentation (#20)
* update documentation

* Fix typo

* Minor fix
2019-06-09 08:50:42 +02:00
Marcus Fritzsch
b0f1590fc5 Basic wayland support though wl_shm (#8)
* x11: need to return somethin from processEvents()

* Added wayland support

* Documented how to use wayland support

* wayland: re-attach the buffer to actually trigger an update

* wayland: use the seat_listener
2017-01-24 20:14:11 +01:00
Daniel Collin
c04a118658 Fixed title 2017-01-24 11:12:57 +01:00
Daniel Collin
d13f5e070b Updated README 2014-06-06 18:23:32 +02:00
Daniel Collin
6a1100b611 Updated README 2014-06-06 18:16:01 +02:00
Daniel Collin
3f856d32bb Updated README 2014-06-06 18:10:29 +02:00
Daniel Collin
0b3bbaa0cb Initial commit 2014-06-06 07:41:52 +02:00