Commit Graph

12 Commits

Author SHA1 Message Date
Carlos Aragonés
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
Darky-Lucera
d6a52459ef added metal support for macosx version (based on rust_minifb) (#17) 2019-03-03 23:34:38 +01:00
Robert Swain
cb49ea94a0 Update for macOS 10.13 (#13) 2018-08-26 08:47:18 +02:00
Ankeet
4f01702f81 Got this working on 10.11 (#12) 2017-05-13 23:00:44 +02:00
Nicolas Guillemot
a5e8dd4e2e fix close window notif and unused vars (#10)
It wasn't detecting that the window was closed when I closed it by
clicking the red X button. As a result, the window would close, but
mfb_update() didn't return -1, so the program kept running.

This was fixed by listening to the willClose event and using it to set a
flag. I'm not sure if this is the best way to do it, I really know
nothing about OSX/Cocoa.

Also, I fixed a few unused varible warnings. And warnings related to
NSUInteger not matching the expected signature with NSWindowStyleMask.
2017-01-24 21:18:06 +01: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
Nicolas Guillemot
920e11a9e5 woops: didnt allocate enough and also clear to zero. 2017-01-24 09:30:21 -08:00
Nicolas Guillemot
3777cae1ee fixed out-of-bounds access to bmiColors
bmiColors is a C style flexible array with a default value of 1, so the bmiColors[1] and bmiColors[2] were accessing memory out of bounds and causing very weird stuff to happen. Fixed by doing the appropriate flexible buffer allocation.
2017-01-24 00:45:21 -08:00
Daniel Collin
2e7fb72a87 Renamed file 2014-06-06 18:13:55 +02:00
Daniel Collin
78e89dbd3d Implemented MiniFB for X11 2014-06-06 17:51:00 +02:00
Daniel Collin
48bc35865e Implemented Windows version 2014-06-06 14:38:37 +02:00
Daniel Collin
4d50ed3fe2 Added first version of Mac implementation 2014-06-06 10:13:41 +02:00