1
0
Fork 0
mirror of https://github.com/bjornbytes/lovr.git synced 2024-07-24 22:53:35 +00:00
Commit graph

41 commits

Author SHA1 Message Date
bjorn fd985c95ff rm isMounted; 2019-05-12 22:22:29 -07:00
bjorn da6fd4d07c Remove Controllers; 2019-05-12 22:22:29 -07:00
bjorn f268810d2a Minor cleanup; Fix some undefined behavior; 2019-04-20 13:11:11 -07:00
bjorn 66b7288764 event: forward declarations; 2019-04-05 04:32:58 -07:00
bjorn 6fdeda9e61 Make lovrRelease non-generic;
We know what type we're releasing 99% of the time, we don't need to
play a guessing game in lovrRelease, just have the caller say which
destructor to use.

There is lovrGenericRelease for situations where we need it, which
does the slower lookup of the destructor.
2019-04-05 03:41:03 -07:00
bjorn e05b835927 Fix prototypes; 2019-02-17 14:39:51 -08:00
bjorn 581d1d7a74 Fix warnings; 2019-02-16 23:43:20 -08:00
mcc 4859360209 Fix compile with -DLOVR_ENABLE_HEADSET=NO 2019-02-01 13:20:28 -08:00
bjorn aa56cbc7b0 Fix crash on repeated calls to Channel:peek; 2019-01-12 20:51:50 -08:00
bjorn 0e99d47394 Fix module destruction;
There is a problem when a Thread stops: it destroys all of the modules
that it required.  This is because we unconditionally call luax_atexit
when modules are required, and when the thread lua_State dies it takes
all of the modules with it.  To fix this, lovr<Module>Init will return
whether or not initialization successfully happened, which provides us
with enough info to know if we should place the luax_atexit destructor
2018-11-19 09:24:28 -08:00
bjorn 4cd5505ac2 glfwPollEvents -> lovrPlatformPollEvents; 2018-11-16 00:24:43 -08:00
bjorn f872a5f094 Re-enable threads for emscripten;
They don't appear to work very well but this simplifies code a lot.
2018-08-30 22:09:54 -07:00
bjorn 9e494cae46 Make custom events work; 2018-07-26 19:38:01 -07:00
bjorn 156c0cde5d Condense event code a bit; 2018-07-26 19:38:01 -07:00
bjorn 57c8dfe146 Clean up includes; 2018-07-04 13:51:35 -07:00
bjorn 012ba07063 Disable threads in WebVR;
Browser/emscripten support is currently unstable.
2018-05-27 19:05:10 -07:00
bjorn b3013704ca Initialize mutex before adding event pump; 2018-04-06 18:51:49 -07:00
bjorn 8b3fcc94b8 Event module is thread safe; 2018-04-01 22:43:54 -07:00
bjorn 3a36bcceae lovr.mount; lovr.headset.isMounted; isPresent changes;
Remove lovr.headset.isPresent.
Replace Controller:isPresent with Controller:isConnected.
Add lovr.headset.isMounted and lovr.mount callback.
2018-02-25 16:42:31 -08:00
bjorn 9ca743dc1a Headset module can be restarted; 2018-02-23 18:38:53 -08:00
bjorn f5fa9a4e5c Make modules more restartable;
Except headset.  Screw you, headset.
2018-02-23 18:38:53 -08:00
bjorn 4cca193fcb lovr.threaderror callback; 2018-02-23 18:38:52 -08:00
mcc 8052896b33 Restart-without-quit support: lovr.event.quit("restart") and return-from-run() both support the string "restart" in place of an exit code. When this happens, the program reruns itself in a new, isolated environment. In Emscripten, no reboot occurs and the program only quits. 2018-01-25 21:32:16 -05:00
bjorn ecde864ec4 Use spooky BOOleans everywhere; 2017-10-31 01:14:09 -07:00
bjorn dfece82c89 Fix undefined behavior with event polling; 2017-05-17 00:03:42 -06:00
bjorn 9eb4d7b393 Move all window code into graphics module; 2017-04-12 19:48:47 -07:00
bjorn 0c6da83332 lovr.focus;
This may not work in all cases involving e.g. overlays.
2017-03-11 19:01:01 -08:00
bjorn f9f0773b92 lovr.controllerpressed; lovr.controllerreleased; 2017-03-11 18:46:07 -08:00
bjorn b84f72f17e Rename vendor to lib; 2017-03-11 02:19:33 -08:00
bjorn e80f390151 Try #pragma once; 2017-01-26 02:21:56 -08:00
bjorn 492a75acba Properly destroy modules on exit; 2017-01-21 18:18:12 -08:00
bjorn 89f0d89223 Improve Controller detection; 2016-11-30 23:03:58 -08:00
bjorn e3c1dcfa54 Overhaul lovr.event; 2016-11-28 22:59:27 -08:00
bjorn 7e4e9a6108 Clean up includes; 2016-11-19 01:28:01 -08:00
bjorn a521cdaa68 Add optional exit code to lovr.event.quit; 2016-10-13 23:50:57 -07:00
bjorn 4cd0bf06c8 Remove osvr; Use openvr; 2016-09-06 10:13:49 -07:00
bjorn 604c5bcbab Fix some headset issues; 2016-08-16 20:35:32 -07:00
bjorn efb8da7cf7 Remove dangling event extern; 2016-08-09 23:31:30 -07:00
bjorn 90147ca7bf Separate Lua API; 2016-08-09 23:28:17 -07:00
bjorn c07ea1cb2e Formatting; 2016-08-08 03:43:51 -07:00
bjorn 462b2d5f50 Refactor; 2016-08-07 18:32:37 -07:00