Alex Szpakowski
3a5c3df02f
Add sync and async texture and buffer readback APIs.
...
- Add imagedata = love.graphics.readbackTexture(texture, [slice, mipmap, x, y, w, h, [dest, destx, desty]]).
- Add readback = love.graphics.readbackTextureAsync(texture, [slice, mipmap, x, y, w, h, [dest, destx, desty]]).
- Add bytedata = love.graphics.readbackBuffer(buffer, [offset, size, [dest, destoffset]]).
- Add readback = ove.graphics.readbackBufferAsync(buffer, [offset, size, [dest, destoffset]]).
- Deprecate Texture:newImageData.
The async variants return a new GraphicsReadback object. It has the following methods:
- isComplete()
- hasError()
- wait()
- getBufferData()
- getImageData()
- update() (called automatically every frame by love, not normally needed).
Support notes:
- readbackBuffer and readbackBufferAsync require buffer copying support.
- readbackTexture with a render target (canvas) is always supported. readbackTexture with a non-render-target requires copy-texture-to-buffer support.
- readbackTextureAsync with a render target requires copy-render-target-to-buffer support. readbackTextureAsync with a non-render-target requires copy-texture-to-buffer support.
2022-05-30 21:53:55 -03:00
Alex Szpakowski
fb450b1df4
Add internal code for temporary buffers.
2022-05-30 21:46:55 -03:00
Alex Szpakowski
a533982cb4
Replace internal 'staging' buffer data type with new 'readback' type.
2022-05-30 21:43:25 -03:00
Miku AuahDark
7b66e50cfc
Add support for love.filedropped in Android.
...
To send file to the filedropped callback, share the files to the game.
Note that for non-fused binary, if there's no game running, LOVE treat it as
*.love game to run.
2022-05-29 01:49:29 +08:00
Miku AuahDark
2879074177
Silence compiler warnings in isModifierActive.
2022-05-28 19:19:50 +08:00
Miku AuahDark
9e1e35ff39
Fixed love.audio.newSource(SoundData) variant.
2022-05-28 19:17:50 +08:00
Miku AuahDark
2822f17a39
Minor improvements and fixes to Android-specific code.
2022-05-28 13:47:53 +08:00
Miku AuahDark
aaeb318aa6
Android: Implement special path URI for passing file descriptors.
...
This is to workaround the limitation of content:// URI severely limited.
2022-05-22 22:40:09 +08:00
Miku AuahDark
2016972607
Android: Reorder fused file preference.
2022-05-22 20:20:39 +08:00
Alex Szpakowski
502adfcb15
Merge pull request #1805 from MikuAuahDark/setadev
...
Support for Audio Device Selection and Disconnection Callback
2022-05-10 18:22:49 -03:00
Miku AuahDark
e79c272140
Update dr_flac to 0.12.38
...
Fix buzzing audio in some cases when decoding FLAC in Ogg container.
2022-05-07 12:18:24 +08:00
Miku AuahDark
7af537a417
Rename *OutputDevice(s) to *PlaybackDevice(s)
2022-05-07 11:04:28 +08:00
Miku AuahDark
b2a6abdc0a
Pass all stopped sources on love.audiodisconnected callback.
...
The behavior of sources re-played during these times is inconsistent.
Streaming sources will desync while static sources stop completely.
2022-05-07 10:50:10 +08:00
Miku AuahDark
2cc93af436
Add love.audiodisconnected callback.
...
The callback is fired when the audio has been disconnected.
2022-05-03 22:36:13 +08:00
Miku AuahDark
5e0f0dc02e
Add love.audio.setOutputDevice
2022-05-03 20:16:26 +08:00
Miku AuahDark
65b898903c
Add love.audio.getOutputDevice(s).
2022-05-03 19:29:24 +08:00
Miku AuahDark
5dd7902175
Use DRMP3_FALSE instead of "false" in MP3 seeking.
2022-05-02 09:44:56 +08:00
Miku AuahDark
5c3f8a8950
Fix compile error.
2022-05-02 09:43:08 +08:00
Miku AuahDark
c9ab08a2d3
Improve MP3 detection to reduce false positive.
2022-05-02 09:20:04 +08:00
Miku AuahDark
c19d7cab1e
Reorder sound decoder factory preference.
2022-05-02 07:40:48 +08:00
Miku AuahDark
2620225c03
Revert "Implement audio probing to reduce audio false positive."
...
This reverts commit 5f386cfa87 and 17800813b9 .
2022-05-01 21:51:31 +08:00
Miku AuahDark
17800813b9
Fix iOS compile error.
2022-05-01 17:15:07 +08:00
Miku AuahDark
5f386cfa87
Implement audio probing to reduce audio false positive.
2022-05-01 17:01:50 +08:00
Alex Szpakowski
ee336e5393
opengl: restructure code for computing format support.
2022-04-23 13:15:58 -03:00
Alex Szpakowski
28a64c2b29
Use uint32 instead of int for some internal bit-flags.
2022-04-23 09:41:29 -03:00
Alex Szpakowski
b2ba63df18
Fix typo in error message
2022-04-23 09:40:02 -03:00
Alex Szpakowski
da1271e9c8
Allow launching a specific/custom .lua file as the main file.
...
Previously you could pass in a folder or .zip to launch a game, now you can also pass in a .lua file directly. It will use the directory containing the lua file as the game source directory.
Resolves #1591
2022-04-23 02:04:19 -03:00
Alex Szpakowski
a9cca65a14
Clean up some compressed texture loading code.
2022-04-22 22:55:48 -03:00
Alex Szpakowski
4e051c6faa
Re-add love.filesystem.exists.
...
It's still useful sometimes because it's a bit cheaper than getInfo.
2022-04-22 21:11:39 -03:00
Alex Szpakowski
b8ff64e9e3
Add love.filesystem.openFile. Deprecate love.filesystem.newFile.
2022-04-22 21:05:20 -03:00
Alex Szpakowski
e167a77994
Fix a couple error message typos
2022-04-22 19:38:17 -03:00
Alex Szpakowski
ce18340312
Update xcode project with new files.
2022-04-21 20:02:48 -03:00
Alex Szpakowski
c09fef8e79
Audio source decoding improvements.
...
- Streaming sources now also stream the file contents instead of loading it into memory, by default. Added a new stream type enum parameter to newSource ("file" or "memory").
- Audio file decoding now chooses the most appropriate decoder based on the file contents instead of the file extension.
- Videos now stream audio from the file instead of loading all of the video file into memory for use with audio decoding.
2022-04-21 19:57:32 -03:00
Alex Szpakowski
d5865e160c
File objects inherit from Stream.
2022-04-21 19:53:27 -03:00
Alex Szpakowski
1e85893abb
Add new DataStream subclass of Stream, internal-only for now.
2022-04-21 19:52:46 -03:00
Alex Szpakowski
ceb23eee48
Add new Stream base class, internal-only for now.
2022-04-21 19:52:04 -03:00
Alex Szpakowski
76193899b3
Fix compilation...
2022-04-18 20:53:46 -03:00
Alex Szpakowski
bb9c342972
Remove unused GME sound decoder backend.
2022-04-18 20:41:55 -03:00
Alex Szpakowski
71a7aed441
minor cleanup of some audio decoder code.
2022-04-18 20:12:08 -03:00
Alex Szpakowski
e61a664a8b
ImageData: limited support for integer pixel formats.
...
For now this doesn't support conversions (get/set/mapPixel, etc). Just the ability for ImageData to contain integer pixel contents, for example via Canvas:newImageData.
2022-04-18 10:46:02 -03:00
Alex Szpakowski
8d3730361b
Add love.dropbegan and love.dropcompleted callbacks.
...
Resolves #1346
2022-04-16 16:47:31 -03:00
Miku AuahDark
321397d1dd
Add love.keyboard.isModifierActive.
2022-04-16 11:15:01 +08:00
Alex Szpakowski
0b6722ea0e
Merge branch 'main' into 12.0-development
2022-04-15 23:47:28 -03:00
Alex Szpakowski
b3b1317f61
linux: fix issues if certain codepaths are hit while signal handlers are temporarily off.
2022-04-15 23:43:30 -03:00
Alex Szpakowski
e512eff37b
Fix love.threaderror when the error message is empty.
...
Fixes #1775
2022-04-15 23:31:57 -03:00
Alex Szpakowski
34f036f2e1
Rename 'display' field to 'displayindex' in setMode and love.conf.
...
Fixes #1711 .
2022-04-15 23:16:13 -03:00
Alex Szpakowski
9682c7a5ad
Fix lua https library when building with autotools
2022-04-11 20:50:22 -03:00
Alex Szpakowski
941fe51ba6
Merge pull request #1782 from MikuAuahDark/dotrequire
...
Show deprecation notice when slashes is passed to require.
2022-04-02 21:19:59 -03:00
Miku AuahDark
730cb08acf
Minor fix to love.localechanged callback.
...
Wrong callback placement.
2022-03-18 10:30:31 +08:00
Miku AuahDark
5603c8915b
Update changelog for getPreferredLocales and localechanged.
2022-03-17 23:41:16 +08:00