Alex Szpakowski
53e63d48c9
Merged default into minor
...
--HG--
branch : minor
2014-08-07 18:10:19 -03:00
Alex Szpakowski
028108ea64
Improved the error message when physfs fails to open a filepath.
2014-08-06 20:16:15 -03:00
Alex Szpakowski
aa05664d4c
Merged default into minor
...
--HG--
branch : minor
2014-07-30 01:32:10 -03:00
Alex Szpakowski
73c0f1e222
Added love.filesystem.isSymlink, love.filesystem.setSymlinksEnabled, and love.filesystem.areSymlinksEnabled. Symbolic link support is disabled by default.
...
love.filesystem.isSymlink will always return false when symbolic link support is disabled, even if the given filepath is actually a symlink.
2014-07-24 00:31:11 -03:00
Alex Szpakowski
d52bab4221
Updated the new module changes to use more compile/link-time checking rather than runtime checking.
2014-07-21 15:12:01 -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
Bart van Strien
59ab602111
Normalize slashes in paths unless they are direct user input (XDG_DATA_HOME/APPDATA, specifically)
2014-07-15 13:16:37 +02:00
Alex Szpakowski
bfa3ec9369
Merged default into minor
...
--HG--
branch : minor
2014-06-05 03:02:50 -03:00
Alex Szpakowski
724bdbd296
love.graphics.newImage, love.image.newImageData, etc. no longer leave Lua-owned FileData objects floating around waiting to be GC'd when called with filename arguments, resulting in less memory use on startup (resolves issue #890.)
...
Moved love.filesystem Lua wrapper code from src/modules/filesystem/physfs/ to src/modules/filesystem/.
2014-06-02 00:22:41 -03:00
Alex Szpakowski
53b20b63a5
Merged default into minor
...
--HG--
branch : minor
2014-05-21 21:16:37 -03:00
Alex Szpakowski
e25cdfc71c
Fixed creating and setting the write directory on some sandboxed operating systems
2014-05-05 00:27:42 -03:00
Alex Szpakowski
9d293af176
Fixed love.filesystem.setIdentity breaking if a file has been written to an old identity dir before the new setIdentity call
2014-05-04 04:10:46 -03:00
Alex Szpakowski
4d579074a1
Removed love.filesystem.exists (resolves issue #641.)
...
Use either love.filesystem.isFile or love.filesystem.isDirectory instead.
--HG--
branch : minor
2014-04-23 02:15:02 -03:00
Alex Szpakowski
aba17607aa
Added an optional callback function argument to love.filesystem.getDirectoryItems. Callback function takes a single argument containing a filepath string.
...
For example: love.filesystem.getDirectoryItems("", print)
2014-03-17 20:14:53 -03:00
Alex Szpakowski
a13fd761cc
Updated love.filesystem's C library loader for require to look in paths added via love.filesystem.mount, when in fused mode
2014-03-12 06:19:56 -03:00
Alex Szpakowski
fda005c5ff
love.graphics.getScissor now has a proper C++ module method
2014-01-09 22:49:00 -04:00
Alex Szpakowski
3120a0e650
Goodbye 2013, hello 2014!
2014-01-03 17:28:58 -04:00
Alex Szpakowski
9c747f1476
Switched to using bearing and advance metrics from the actual bitmap glyph object, removed old unused method declarations in the Filesystem class.
2014-01-01 03:52:43 -04:00
Alex Szpakowski
ccc5535a82
The love.filesystem module searchers for require are now tried after package.preload instead of before.
2014-01-01 02:08:50 -04:00
Alex Szpakowski
279cecaa6b
Improved the error text for LÖVE’s module searchers (used in require.)
2013-12-31 22:31:08 -04:00
Alex Szpakowski
eb4fdf3bbe
Use a separate preprocessor define for using Framework #includes in OS X (resolves issue #796 )
2013-12-13 02:37:06 -04:00
Alex Szpakowski
3b532fdb70
Fixed an uncaught exception in File:getSize
2013-11-18 05:29:53 -04:00
Alex Szpakowski
8cc5364d15
Changed the SearchOrder argument of love.filesystem.setIdentity and love.filesystem.mount to a boolean (append) instead of an enum
2013-10-30 17:05:46 -03:00
Alex Szpakowski
249dad3cae
love.filesystem.mkdir -> love.filesystem.createDirectory, love.filesystem.enumerate -> love.filesystem.getDirectoryItems. Resolves issue #609 .
2013-10-20 04:07:37 -03:00
Bart van Strien
f6f8251234
Hopefully fix appdata dir creation on windows
2013-10-15 20:03:22 +02:00
Alex Szpakowski
8b7f151a4d
Added joystick vibration support for most common controllers (resolves issue #159 ).
...
Added Joystick:setVibration(left, right), Joystick:getVibration, and Joystick:isVibrationSupported.
left and right are numbers between 0 and 1 which correspond to the strength of the gamepad's left and right rumble motors, if it has them.
2013-10-05 01:54:41 -03:00
Bart van Strien
0e6786988e
Try to create appdata dir if it doesn't exist (hopefully resolves #680 )
2013-10-04 14:30:56 +02:00
Alex Szpakowski
8d5ddb9e34
Fixed some internal documentation (thanks to clang's -Wdocumentation)
2013-09-23 21:52:28 -03: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
c15fc4453b
Re-added Data:getPointer (can be used with LuaJIT's FFI)
2013-08-29 17:16:21 -03:00
Alex Szpakowski
ec9dec6b80
Replaced luax_newtype with luax_pushtype (and added luax_rawnewtype for the old functionality of luax_newtype.)
...
luax_pushtype keeps the object in a weak table and checks the table before creating a new userdata, so it re-uses the object's existing wrapper userdata if it can, whenever the object is pushed to Lua.
This fixes some subtle issues with love objects, where using them as keys in tables would not always work as expected (https://love2d.org/forums/viewtopic.php?f=4&t=39398&p=112388#p112415 ). It also decreases the amount of new Lua objects created, saving the garbage collector some work.
2013-08-29 00:40:06 -03:00
Alex Szpakowski
daf50698b8
Added love.filesystem.getSourceBaseDirectory and changed love.filesystem.mount to allow mounting the path returned by love.filesystem.getSourceBaseDirectory in fused mode.
2013-08-10 20:11:50 -03:00
Alex Szpakowski
fc3affb9b9
Removed 'release mode' and love.releaseerrhand, and added love.filesystem.isFused (resolves issue #579 ).
...
Games which are fused (either via appending the .love to the executable or with --fused) automatically have the changes which previously only applied to fused games in release mode.
2013-08-05 15:02:50 -03:00
Alex Szpakowski
7a20bbc6c4
Added an optional search order enum ("first" or "last") to love.filesystem.setIdentity and love.filesystem.mount (resolves issue #694 )
2013-08-04 00:32:23 -03:00
Alex Szpakowski
a4ff39e0d4
Improved error checking for some enum strings (resolves issue #690 ).
...
Also moved love.audio.newSource from Lua code into C++ code
2013-08-03 21:24:43 -03:00
Alex Szpakowski
ce9d0be1ea
Fixed love.filesystem.mount to consistently fail to mount things which are inside the game source directory, instead of only failing when the source dir is a zipped .love
2013-08-01 02:39:54 -03:00
Alex Szpakowski
bf91d5cc6f
Merged bartbes/love-experiments/love.filesystem.mount2 into default
2013-07-09 00:13:18 -03:00
Alex Szpakowski
abd31ca4e2
Fixed ParticleSystems and Files crashing instead of erroring when given bad sizes (issue #666 )
2013-07-04 06:29:02 -03:00
Alex Szpakowski
8fbf43fcc3
Added File:setBuffer/getBuffer, File:flush, and File:getMode.
2013-06-27 06:26:20 -03:00
Alex Szpakowski
186bcae7cb
Added File:isOpen
2013-06-27 02:23:56 -03:00
Alex Szpakowski
579a3052e6
Removed restriction on mounting a filepath to root
...
--HG--
branch : love.filesystem.mount2
2013-06-22 17:04:51 -03:00
Alex Szpakowski
b4fa9131d2
Fixed love.filesystem.[un]mount
...
--HG--
branch : love.filesystem.mount2
2013-06-22 15:54:53 -03:00
Bart van Strien
bff2c1b5f1
Recreate love.filesystem.mount, adding mount and unmount, for your archive (and folder?) pleasure
...
--HG--
branch : love.filesystem.mount2
2013-06-22 14:58:12 +02:00
Alex Szpakowski
4b92c4bf4b
Fixed old save directories not being removed from the filesystem search path properly when setIdentity is called
2013-06-12 00:54:46 -03:00
Alex Szpakowski
daea857c1e
Removed duplicated code for a crash workaround in Mac OS 10.5
2013-05-16 15:30:34 -03:00
Bart van Strien
721d50c2ef
Make most love.filesystem functions return nil, err instead of erroring (when used correctly)
...
Note that argument exceptions, for instance, are still thrown as errors.
Also fixes a potential uncaught exception with getSize being called for the optional
size arg in read, now it just uses the ALL constant instead.
File:read no longer opens and closes a file automagically (this was undocumented, and weird)
NOTE: the love.filesystem.lines iterator can still error, but this should only happen in
case there's something really, really wrong (otherwise love.filesystem.lines would've failed
already)
NOTE: love.filesystem.lines still errors, because otherwise you'd get weird errors from the for
loop (namely 'attempt to call nil value') instead of seeing anything useful
2013-05-10 16:39:02 +02:00
Alex Szpakowski
4952ebd5d9
love.filesystem.newFile now accepts an optional FileMode parameter ("r", "w", "a") to better mirror io.open
2013-05-08 17:47:37 -03:00
Alex Szpakowski
63404f7097
Added love.graphics.getRendererInfo(infotype). Useful for creating more informative error reports and advanced debugging.
...
Returned string can be highly system-dependent, so don't rely on its output!
infotype can be "name", "version", "vendor", or "device"
2013-05-05 16:47:42 -03:00
Alex Szpakowski
fb9f8d2962
Added the getString method to all Data objects (issue #608 )
2013-04-26 22:35:01 -07:00
Alex Szpakowski
16f3a93f28
Removed vestigial internal code for Data:getPointer
2013-04-26 22:05:58 -07:00