Commit Graph

30 Commits

Author SHA1 Message Date
bjorn 161a14adc9 Reorganize keynums;
This is slightly easier on the eyes.
2020-08-29 15:27:16 -06:00
bjorn 4a8e8ae2a9 Rename SUPER key to OS internally; 2020-08-19 14:03:06 -06:00
bjorn ec257b179f Support Lua 5.2, 5.3, 5.4; 2020-08-19 13:12:57 -06:00
bjorn 2a8c454de1 Add some more keys; 2020-08-08 16:04:20 -06:00
bjorn 079338c0cc textinput event utf8 encode; 2020-08-07 16:25:56 -06:00
bjorn c24317d982 Start textinput event; 2020-08-07 15:17:19 -06:00
bjorn 682633d98b Add scancode and key repeat arguments to key events; 2020-08-07 14:15:45 -06:00
bjorn cb4281b889 Add keypressed and keyreleased events; rm t.hotkeys; 2020-08-06 19:19:45 -06:00
bjorn c0d73ab541 Add resize event; lovr.resize callback; 2020-05-02 13:09:10 -06:00
mcc b5e72d8bd9 Restart cookie minor changes for PR review 2020-04-16 10:57:13 -04:00
mcc fbcce7fc59 Reworked quit/restart events (compatibility break)
Based on Slack conversation, the following changes:
- lovr.event.quit("restart") no longer supported
- lovr.event.quit no longer takes restart "cookie"
- When lovr.event.restart() called, lovr.quit() is not called, instead lovr.restart() is called
- Value returned from lovr.restart(), when called, becomes the cookie
- lovr.event.quit takes the lovr.event.quit() return code as an argument

lovr.run() is unchanged, it still returns (exit code | "restart", cookie).
2020-04-16 00:32:54 -04:00
bjorn 90b605f012 Add restart cookie; lovr.event.restart; arg.restart; 2020-02-26 14:40:40 -08:00
bjorn 18dcb07b98 Convert stuff over to use new enum system; 2020-02-16 18:31:02 -08:00
bjorn e2d8f8c645 platform -> os;
The function names are staying the same for now.
2019-12-13 19:55:46 -08:00
bjorn e2f67c106d Thread:start supports up to 4 arguments;
They are passed to the chunk.
2019-12-13 15:50:10 -08:00
bjorn 2f9400a5f7 Adjust includes; 2019-12-10 13:01:28 -08:00
bjorn d21911d010 Add core/map hash table; rm lib/map; 2019-10-30 00:07:05 -07:00
bjorn d51d2b4105 Fix stack balance with luax_checkvariant;
Was breaking Channel:push.
2019-10-22 16:42:10 -07:00
bjorn 305596adf8 Fix windows build;
LOVR_EXPORT needs to be on the declaration, unfortunately.
2019-08-26 15:53:10 -07:00
bjorn 8d4760167f luax is now api; 2019-08-21 15:27:26 -07:00
bjorn 7c8a44cc57 Cleanup function pointer typedefs; 2019-08-21 14:44:54 -07:00
bjorn 97e90a8699 Fix checkvariant error message; 2019-08-19 14:16:42 -07:00
bjorn 947c468eb1 Don't restart twice on F5; 2019-07-29 11:52:06 -07:00
mcc a6936b5649 Fix -DLOVR_ENABLE_THREAD=OFF compile
l_event.c was processing a thread-related event and in the process using a thread struct, even when LOVR_ENABLE_THREAD is undefined and threads do not exist. I caused the thread event type to simply not exist when the thread module is not being built.

Since the event is now only sometimes present, I put it at the end of the enum as slight protection against binary mismatches with dynamically loaded modules.
2019-07-10 16:23:20 -07:00
bjorn 7ebee200ea rm strdup;
It isn't part of C, causing compiler errors on some platforms.
2019-06-20 22:21:31 -07:00
bjorn 374492c586 Add experimental hotkeys flag;
- Add t.hotkeys flag to conf.lua, which defaults to true.
- If t.hotkeys is truthy, the following hotkeys will be enabled:
  - Escape: Quit the experience
  - F5: Restart the experience
2019-06-02 03:00:12 -07:00
bjorn 22fe333150 Update refcounting (again);
- Ref struct only stores refcount now and is more general.
- Proxy stores a hash of its type name instead of an enum.
- Variants store additional information instead of using a vtable.
- Remove the concept of superclasses from the API.
- Clean up some miscellaneous includes.
2019-06-02 01:02:26 -07:00
bjorn df6b7fc96a Ref is mostly private now;
It's really nice how objects don't need to care about how they're
allocated/managed now.
2019-05-20 15:09:06 -07:00
bjorn e368723248 Improve platform-specific defines; 2019-05-20 04:05:39 -07:00
bjorn 4a47afca38 Organize api folder; 2019-05-19 00:31:42 -07:00
Renamed from src/api/event.c (Browse further)