20 Commits
Author SHA1 Message Date
Carlos AragonésandGitHub f54b94a51f Merge pull request #67 from aduros/2021-11-15-fix
Swap mouse right and middle buttons on X11 (Fix #65)
2021-11-16 16:59:33 +01:00
Carlos AragonésandGitHub 23b1a10f8d Merge pull request #64 from aduros/2021-11-13-patch
Handle the X11 WM_DELETE_WINDOW protocol for closing windows.
2021-11-15 10:07:26 +01:00
Carlos AragonésandGitHub 571690a513 Merge pull request #60 from onbjerg/linux-gl-context
Properly create OpenGL context on Linux
2021-05-05 23:05:43 +02:00
Carlos AragonésandGitHub 1129df5af5 Merge pull request #55 from bradgrantham/master
Fix https://github.com/emoon/minifb/issues/54
2021-04-30 15:00:30 +02:00
Carlos AragonésandGitHub 056d419a10 Merge pull request #50 from drfuchs/master
Add hidpi test
2020-09-21 09:41:04 +02:00
Carlos AragonésandGitHub 2110dc18ac Merge pull request #41 from maximumspatium/master
Enable conditional compilation of examples.
2020-08-06 16:32:11 +02:00
Carlos AragonésandGitHub 3226ac3aad Merge pull request #38 from emoon/revert-37-fix/build-break
Revert "Fixes build break in linux"
2020-06-03 17:14:24 +02:00
Carlos AragonésandGitHub 698b50c664 Revert "Fixes build break in linux (#37)"
This reverts commit 83d7dbc678.
2020-06-03 17:14:09 +02:00
Carlos AragonésandGitHub c381721dad Merge pull request #15 from lkesteloot/master
Fix size of window on MacOS.
2020-04-22 15:28:56 +02:00
Carlos AragonésandGitHub c65e93ff88 Merge branch 'master' into master 2020-04-22 15:28:10 +02:00
Carlos AragonésGitHubCarlos Aragones <>
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
661092081c Renamed typo scrool by scroll (#29)
* 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

* fix issue 32

Co-authored-by: Carlos Aragones <>
Co-authored-by: caragones <carlos.aragonesmartinez-external@gemalto.com>
2020-03-06 07:51:57 +01:00
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ésandDaniel Collin f10bcfeabf Simplify cmake (#28)
* 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
2020-01-04 18:21:45 +01:00
Carlos AragonésandDaniel Collin 0257a60419 mfb_update_events (#27)
* 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
2019-12-14 11:20:59 +01:00
Carlos AragonésandDaniel Collin 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ésandDaniel Collin 25a440f822 Update documentation (#20)
* update documentation

* Fix typo

* Minor fix
2019-06-09 08:50:42 +02:00
Carlos AragonésandDaniel Collin e679c38955 Add some examples for the new features (#21)
* Added some examples

* changed window names
2019-06-09 08:50:28 +02:00
Carlos AragonésandDaniel Collin 21d9377822 Add multiple windows2 (#19)
* MacOSX with input events and mfb_set_viewport

* Windows with input events and mfb_set_viewport

* Minor changes in macosx and windows

* X11 with input and mfb_set_viewport

* Minor changes on X11

* Fix bug in X11 resize event

* Fix bug in windows resize

* added scale image to X11

* Added stretch_image with & without bilinear interpolation

* moved MiniFB_internal.h

* Added wayland events

* minor changes

* unify a bit the window structs

* More work on wayland

* Added cmake file

* minor fix on windows

* modified test

* Fix on wayland.
Unset wayland as default for linux

* Use stdbool instead of our own macro eBool
Remove prefix e from all enums

* Remove _ex sufix in common files

* merge X11MiniFB_ex.c into X11MiniFB.c

* Merge WaylandMiniFB_ex.c into WaylandMiniFB.c

* Add user_data to callbacks

* Merge WinMiniFB_ex.c into WinMiniFB.c

* Some minor changes on Windows

* Fix bug on Wayland

* Multiple Windows for MacOS X & Linux

* Multiple Windows for Windows
Refactor

* Refactor

* Added mfb_get_key_name

* remove some warnings

* Events per window working on MacOS & Linux (maybe Windows)

* Fix on Windows

* Added default key callback on macos & wayland

* Unify keyboard_default on all platforms

* keyboard_default on all platforms
2019-06-08 20:34:05 +02:00
Carlos AragonésandDaniel Collin 8b6148cf97 Add input events (#18)
* MacOSX with input events and mfb_set_viewport

* Windows with input events and mfb_set_viewport

* Minor changes in macosx and windows

* X11 with input and mfb_set_viewport

* Minor changes on X11

* Fix bug in X11 resize event

* Fix bug in windows resize

* added scale image to X11

* Added stretch_image with & without bilinear interpolation

* moved MiniFB_internal.h

* Added wayland events

* minor changes

* unify a bit the window structs

* More work on wayland

* Added cmake file

* minor fix on windows

* modified test

* Fix on wayland.
Unset wayland as default for linux

* Use stdbool instead of our own macro eBool
Remove prefix e from all enums

* Remove _ex sufix in common files

* merge X11MiniFB_ex.c into X11MiniFB.c

* Merge WaylandMiniFB_ex.c into WaylandMiniFB.c

* Add user_data to callbacks

* Merge WinMiniFB_ex.c into WinMiniFB.c

* Some minor changes on Windows

* Fix bug on Wayland

* Added mfb_get_key_name

* keyboard_default on all platforms
2019-06-08 20:11:02 +02:00