Alex Szpakowski
33bc8aabfc
Add Joystick:getGamepadMappingString and love.joystick.getGamepadMappingString(guid). Resolves issue #1371 .
2019-09-15 14:02:19 -03:00
Alex Szpakowski
0752f27bdf
Update copyright year for 2019
2019-01-03 21:09:05 -04:00
Bart van Strien
571503c02e
Don't use deprecated isFile in love.joystick.loadGamepadMappings ( fixes #1391 )
2018-04-04 17:49:51 +02:00
Bart van Strien
e80247c191
Happy new year! ✨
2018-01-03 19:47:35 +01:00
Bart van Strien
9e4374935d
Show (short) list of possible enum values when an invalid value is encountered ( resolves #1318 )
...
All enum errors have (hopefully) been changed to a luax_enumerror, which has a
fixed error message. If additionally a list of valid options is passed, it
lists that in the error message. For every enum error with few options I've
implemented this using a getConstants call.
This solution has been designed specifically to reduce the number of template
instantiations (as I've been told that was a concern). All new template code
happens in places where there already was an instantiation of the relevant
StringMap. Of course there is still std::vector<std::string>...
--HG--
branch : minor
2017-10-02 17:11:53 +02:00
Alex Szpakowski
34ebe18f14
Use luaL_check/optinteger instead of luaL_check/optnumber when getting integer arguments to functions. Resolves issue #1251 .
...
--HG--
branch : minor
2017-07-16 12:17:50 -03:00
Alex Szpakowski
abb72cb813
Happy new year! 🥂
...
--HG--
branch : minor
2017-01-02 01:28:29 -04:00
Alex Szpakowski
b620f32200
Work around SDL issues in Joystick:getGamepadMapping with XInput controllers (issue #1239 ).
...
This doesn’t fix the underlying issues in SDL so there may be other aspects of love.joystick which are still affected.
--HG--
branch : minor
2016-12-10 16:14:14 -04:00
Bart van Strien
5d43c9601a
Automatically deduce the type in luax_pushtype, if possible
...
--HG--
branch : dynamiccore2
2016-11-13 17:38:42 +01:00
Bart van Strien
c761202486
Build type information on first use (load-time), instead of using a hardcoded list
...
--HG--
branch : dynamiccore2
2016-11-13 16:38:57 +01:00
Alex Szpakowski
46a2e7b85c
Happy new year! 🎉
2016-01-01 00:05:06 -04:00
Bart van Strien
3cb777e2b7
Add basic lua 5.3 support
2015-06-16 10:25:41 +02:00
Alex Szpakowski
2f419c1c83
Replaced most cases of type bits and type name strings in love's Lua wrapper code with type id's.
...
--HG--
branch : minor
2015-03-01 18:32:41 -04:00
Alex Szpakowski
c7b45b3505
Updated copyright for the new year
2014-12-31 19:32:43 -04:00
Alex Szpakowski
0d28135465
Fixed love.joystick.loadGamepadMappings to work properly if a FileData object is passed to it.
2014-11-03 16:24:28 -04:00
Alex Szpakowski
da7cd267ea
Changed luax_pushtype to retain the pushed object itself, but only if the object isn't in the Lua state already.
...
Previously, calling e.g. love.graphics.getFont() 10,000 times would retain the object 10,000 times (and release it 10,000 times when the Font object was garbage-collected in the Lua state.) Now it will only retain it once and release it once.
2014-08-09 16:04:59 -03:00
Alex Szpakowski
014b9a46e5
Updated the Lua wrapper code for modules to account for cases where the module's instance is removed from memory completely and recreated during the program's lifetime.
2014-07-21 14:52:01 -03:00
Alex Szpakowski
ddb9997ead
Replaced Joystick:saveGamepadMapping with love.joystick.saveGamepadMappings, which saves all gamepad mappings from both recently-used joysticks and recently-modified mappings. saveGamepadMappings returns a string of newline-separated mappings and takes an optional filename argument which writes it to a file.
2014-06-05 00:25:34 -03:00
Alex Szpakowski
10e0d4b900
Moved the love.joystick Lua wrapper code from modules/joystick/sdl/ to modules/joystick/.
2014-06-04 16:23:39 -03:00