Alex Szpakowski
c2de8dbb6a
Fixed audio on android to properly pause when the app is inactive, and resume when the app becomes active again.
2016-01-31 18:41:24 -04:00
Alex Szpakowski
46a2e7b85c
Happy new year! 🎉
2016-01-01 00:05:06 -04:00
Alex Szpakowski
7ebef76b24
Added love.window.setScreenSaverEnabled and love.window.isScreenSaverEnabled (resolves issue #1088.)
2015-11-24 22:16:40 -04:00
Martin Felis
637a3a9d62
Pause OpenAL when the app is in the background, on Android.
2015-08-13 19:46:11 -03:00
Alex Szpakowski
66942d5f31
Added the ability to use custom mipmaps in Images, via love.graphics.newImage(filename, {mipmap1, mipmap2, ...}). Resolves issue #1064 .
...
All mipmap levels must be present if custom mipmaps are used (and their sizes must be half the size of the previous mipmap level, rounded down.)
Image:getData now returns all custom mipmaps in an Image.
2015-07-30 20:48:36 -03:00
Alex Szpakowski
48a0910907
Renamed love.textedit to love.textedited. (text composition event callback)
2015-05-29 23:33:01 -03:00
Alex Szpakowski
8e42f591ce
Updated the iOS xcode project search paths for the luajit headers and static library.
2015-04-25 12:00:07 -03:00
Alex Szpakowski
cffa899e03
Explicitly mention SDL in the error message caused by SDL subsystem initialization failure.
2015-03-26 14:51:47 -03:00
Alex Szpakowski
86d41620dd
Replaced the mouse button constants ("l", "r", "m", etc.) with button numbers. 1 is the primary button, 2 is the secondary button, 3 is middle-mouse, etc. Resolves issue #1019 .
2015-03-25 00:31:16 -03:00
Alex Szpakowski
78dd8bc547
Added love.touch.getPressure(touchid). Not useful on most touch-capable devices, but I do expect Apple's Force Touch to make it into iPhones in the near future.
2015-03-24 20:45:21 -03:00
Alex Szpakowski
14cbc91e7f
Fixed a memory leak in love.graphics.newText.
2015-03-16 03:13:10 -03:00
Alex Szpakowski
b76b7bac8b
Added support for a few more mouse buttons (via "x3", "x4", and "x5" button constants.)
2015-03-07 23:28:58 -04:00
Alex Szpakowski
7e99ea6839
Added a boolean argument to love.mousemoved indicating whether the event came from a touch press (love.mousepressed and love.mousereleased already have it.)
2015-03-07 00:41:18 -04:00
Alex Szpakowski
9869999fda
Added a missing key constant.
...
--HG--
branch : minor
2015-03-02 00:52:07 -04: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
c572b1af19
Moved the Lua wrapper code for love.event out of the sdl implementation folder.
...
--HG--
branch : minor
2015-03-01 02:55:50 -04:00
Alex Szpakowski
95f87ed886
Added love.lowmemory event callback function, called when the app is close to running out of memory on iOS and Android.
...
--HG--
branch : minor
2015-02-26 00:45:48 -04:00
Alex Szpakowski
52c4f2c119
Improved the performance of love.window.getPixelScale / toPixels / fromPixels by caching some values. Made some coordinate space-sensitive code use the proper conversions to get to the correct coordinate space.
...
--HG--
branch : minor
2015-02-23 17:55:30 -04:00
Alex Szpakowski
33d20620b5
The Proxy struct now stores an actual love::Object pointer (rather than void*), which makes code using Proxies a bit cleaner.
...
--HG--
branch : minor
2015-02-21 20:52:29 -04:00
Alex Szpakowski
e26e170f78
Enabled high-dpi code on Linux (even though SDL doesn't support it yet on Linux, as of 2.0.4.) SDL 2.0.1 or newer is now required on Linux.
...
I'd rather have high-dpi work on Linux without needing to rebuild love when it's eventually implemented in SDL, rather than preserve backwards-compatibility with SDL 2.0.0 on Linux (which isn't important for love 0.10.0.)
--HG--
branch : minor
2015-02-21 19:06:41 -04:00
Alex Szpakowski
5652475dd2
Use lightuserdata instead of Lua numbers (doubles) to represent touch IDs.
...
--HG--
branch : minor
2015-02-17 22:46:20 -04:00
Alex Szpakowski
c02c8b154d
Added a boolean argument to love.mousepressed and love.mousereleased indicating whether the button event originated from a touchscreen press
...
--HG--
branch : minor
2015-02-17 02:33:42 -04:00
Alex Szpakowski
ac2b03e8a4
Added love.graphics.isActive. love.graphics function calls (and method calls on objects created via love.graphics) are only guaranteed to work when isActive is true, otherwise bad things might happen (the program crashing, for example.)
...
It's usually only false when the app is inactive on iOS, and when the window hasn't been created yet.
--HG--
branch : minor
2015-02-17 02:24:09 -04:00
Alex Szpakowski
cafbf1ffbe
Trigger love.quit when the SDL_APP_TERMINATING event occurs.
...
--HG--
branch : minor
2015-02-17 00:40:50 -04:00
Alex Szpakowski
2f1c89006e
Slightly more robust hack to work around SDL's touch coordinate issues in Linux.
...
--HG--
branch : minor
2015-02-16 17:35:45 -04:00
Alex Szpakowski
5c1e6014cc
Changed the love.keypressed and love.keyreleased event callbacks to be love.keypressed(key, scancode, isrepeat) and love.keyreleased(key, scancode). Added love.keyboard.isScancodeDown. Resolves issue #993 .
...
--HG--
branch : minor
2015-02-16 17:10:03 -04:00
Alex Szpakowski
7f9abc1e77
Added love.touch module and touch screen events. Resolves issue #825 .
...
Note: this implementation is slightly different from the implementation in the love 0.9.x Android and iOS ports!
Added love.touchpressed(id, x, y), love.touchmoved(id, x, y, dx, dy), and love.touchreleased(id, x, y, dx, dy).
id is a unique identifier for the touch press that persists until love.touchreleased. After that it is no longer unique.
x and y are the coordinates of the touch event in pixels within the window.
dx and dy are the amount in pixels that the touch has moved since the last event.
Added love.touch.getTouchCount and love.touch.getTouch(index).
love.touch.getTouch takes an index (not the same as an id. indices are not stable and don't correspond to a unique touch press.)
It returns the id of the touch and its current x and y coordinates in pixels.
--HG--
branch : minor
2015-02-16 16:29:45 -04:00
Alex Szpakowski
c106d9ff53
love.event can now handle any number of event arguments.
...
--HG--
branch : minor
2015-02-15 21:31:22 -04:00
Alex Szpakowski
a7e4148869
Merged default into minor
...
--HG--
branch : minor
2015-01-16 15:47:26 -04:00
Alex Szpakowski
b4f2a9417a
Added new event callback love.mousemoved(x, y, xrel, yrel), where xrel and yrel are the amount of pixels moved since the last event. Added love.mouse.setRelative(bool relative) and love.mouse.isRelative. Resolves issue #470 .
...
Enabling relative mouse mode will hide the cursor and let the system generate relative mouse move events while preventing the mouse from getting stuck at the edges of the screen (i.e. you can keep moving the mouse in one direction forever and the relative movement events will be generated accordingly.)
The reported absolute mouse position is not updated while relative mode is enabled, even while relative movement events are generated.
2015-01-15 20:22:57 -04:00
Alex Szpakowski
c7b45b3505
Updated copyright for the new year
2014-12-31 19:32:43 -04:00
Alex Szpakowski
8d0654a6a7
Added runtime drag-and-drop file and folder support via new love.filedropped and love.directorydropped event callback functions. filedropped has a single File object argument, and directorydropped has a single string argument containing the full path of the directory, which can be used with love.filesystem.mount.
...
--HG--
branch : minor
2014-10-18 20:30:36 -03:00
Alex Szpakowski
34688e929e
Merged default into minor
...
--HG--
branch : minor
2014-09-28 15:56:04 -03:00
Alex Szpakowski
808e533b02
Tweaked streaming Sources to use fewer OpenAL buffers (and increased the amount of decoded data per buffer to compensate), and removed some unnecessary #include statements.
2014-09-28 14:58:59 -03:00
Alex Szpakowski
c6b610d116
Cleaned up some code.
2014-09-21 19:50:02 -03:00
Alex Szpakowski
aa05664d4c
Merged default into minor
...
--HG--
branch : minor
2014-07-30 01:32:10 -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
bfa3ec9369
Merged default into minor
...
--HG--
branch : minor
2014-06-05 03:02:50 -03:00
Alex Szpakowski
dfa319e01a
Replaced the EXCEPT_GUARD macro for converting love exceptions into Lua errors with the new luax_catchexcept function, which takes lambda function arguments.
2014-06-03 19:27:00 -03:00
Alex Szpakowski
38b65b859a
Merged default into minor
...
--HG--
branch : minor
2014-05-03 22:27:01 -03:00
Alex Szpakowski
e4dc533bb2
Minor code cleanup
2014-05-01 14:12:21 -03:00
Alex Szpakowski
1b61091aae
Removed the 'wu' and 'wd' constants for love.mousepressed, added new love.wheelmoved(x, y) event callback.
...
+x is mousewheel-right, +y is mousewheel-up.
--HG--
branch : minor
2014-04-19 21:36:06 -03:00
Alex Szpakowski
a22c4b5f92
Explicitly #ifdef'd out SDL 2.0.1+ function calls for Linux to avoid runtime function resolving problems when love is built with SDL 2.0.1+ headers but run using SDL 2.0.0.
2014-03-31 03:45:22 -03:00
Alex Szpakowski
b9fd3f3554
Missed one
2014-03-04 01:09:48 -04:00
Alex Szpakowski
07aba4c147
Added some missing obscure key constants
2014-03-04 00:52:16 -04:00
Alex Szpakowski
0d52ac6d52
Fixed dumb typo
2014-01-17 21:12:30 -04:00
Alex Szpakowski
309193895a
Added opt-in support for high-dpi mode in OS X when on a retina display (resolves issue #761 ).
...
Added a ‘highdpi’ boolean flag to t.window/love.window.setMode (defaults to false.)
When the window is actually in high-dpi mode on a supported display, the graphics width and height and the mouse position are in pixels, rather than ‘window coordinates’.
Added love.window.getPixelScale. Returns the scale factor of the window from user-space points to pixels (e.g. it will be 1 normally, and 2 on a retina display in OS X with high-dpi mode enabled.)
2014-01-17 21:11:20 -04:00
Alex Szpakowski
3120a0e650
Goodbye 2013, hello 2014!
2014-01-03 17:28:58 -04:00
Alex Szpakowski
06f80d5c08
Fixed undefined behaviour when love exceptions are converted into Lua errors (resolves issue #729 )
2013-09-05 23:17:29 -03:00
Alex Szpakowski
d3826aba9d
Improved thread safety of love.event.wait and love.event.push
2013-08-30 17:34:58 -03:00