1
0
Fork 0
mirror of https://github.com/bjornbytes/lovr.git synced 2024-07-04 21:43:34 +00:00
Commit graph

59 commits

Author SHA1 Message Date
bjorn 5bd48f16f5 lovr.system.get/setClipboardText; 2024-01-29 12:52:41 -08:00
bjorn 375866d3d4 lovr.system.openConsole; 2023-12-02 18:17:36 -08:00
bjorn 9ff8ad61e1 Prefix KEY enums with OS_KEY; 2023-10-31 13:16:20 -07:00
bjorn c98f945cae rm os_window_message_box;
The message box is meant to be a hack to improve UX on Windows, not an
officially supported feature of core/os.  So it's more appropriate to
inline it in the one place/platform where it's used.
2023-09-17 17:22:08 -07:00
bjorn 14cb2ed368 Add os_thread_attach/os_thread_detach;
These are called when creating/destroying Thread objects.  It's
currently only implemented on Android, where it attaches/detaches the
Java VM to the thread.  This allows JNI calls to be used on threads.

However I don't think e.g. `lovr.system.requestPermission` will work on
a thread yet, because it uses the global JNI env from the main thread
instead of the thread's JNI env.  Still, attaching/detaching the VM is
an improvement and will allow well-behaved JNI methods to work on
threads now.

I don't know how expensive this is, yolo.
2023-09-05 16:20:32 -07:00
bjorn 6f566f2125 Show a message box when Vulkan initialization fails on Windows; 2023-08-17 15:02:53 -07:00
Josip Miskovic f0d916787a Add wheelmoved callback 2023-06-17 12:42:18 +02:00
bjorn cb44549205 Fix more prototypes; 2023-04-25 21:45:30 -07:00
bjorn 9c054c0515 Add mouse input to lovr.system; 2023-04-01 13:08:47 -07:00
Bjorn 49489dc0e8
Apply suggestions from code review 2023-02-05 21:47:52 -08:00
kokokoshka 85b6e36020 Android package rename via CMake 2023-01-30 20:35:49 +03:00
bjorn 3e0d2a1ecf core/os: window size is always in framebuffer units;
pixel density is exposed as a separate accessor.
2023-01-10 19:54:48 -08:00
bjorn 0cacddb2f8 Fix Android quitting again;
See comment for details.
2022-12-11 02:11:11 -08:00
bjorn 71df5176ad Fix lovr.event.quit on Android; 2022-12-10 00:12:55 -08:00
bjorn 6d1bbe9c5c Fix Android build on new NDKs;
Some Android header defines DEPTH, which clashes with a symbol in the
OpenXR driver.  This change just stops using Android headers in there
and declares more granular private functions.  It also removes a few
unused private os functions.
2022-11-15 20:35:39 -08:00
bjorn 9783140725 Fix window resize; 2022-11-09 19:05:01 -08:00
bjorn fe31431016 rm EGL/X11; Android fixes; 2022-06-20 18:23:28 -07:00
bjorn 970a84a514 Surface, swapchain, window texture, vsync; 2022-05-11 15:28:04 -07:00
bjorn e820e40e08 Move window opening to lovr.system; 2022-05-09 12:43:19 -07:00
bjorn fd39ed9420 os_android: fix improper cast; 2021-03-24 14:32:56 -06:00
mcc e3c2b5b865 Fix Android build
- Fix typos after refactor
- Fix CMake when using ANDROID_PACKAGE
2021-03-22 14:09:16 -06:00
bjorn a09b7de545 lovr.system.getCoreCount; 2021-02-25 09:30:05 -07:00
bjorn 4f5adbc64c lovr.system; 2021-02-25 09:00:12 -07:00
bjorn fb1447503b Fix gcc warnings; 2021-02-19 23:44:23 -07:00
bjorn ccc53a10aa Cleanup; 2021-02-08 16:08:29 -07:00
bjorn 68f5bb3095 Fix style issues; 2021-02-08 16:08:29 -07:00
Nevyn Bengtsson 5e66ecf000 lovrPlatformRequest{AudioCapture->Permission}(Perm) + platform stubs 2021-02-08 16:08:29 -07:00
Nevyn Bengtsson 0265babef4 Android: Ask for permissions on demand
By looking for failed start and requesting then;
and then emitting a new event type when
permission has been granted or rejected;
and then using that event in the default
boot.lua to re-start capture.
2021-02-08 16:08:29 -07:00
bjornbytes a81cd0d731 KeyCode -> KeyboardKey because X11 conflict; 2020-11-12 18:08:04 -07:00
bjorn 4f730a89a7 android: fix t.graphics.debug; 2020-09-16 20:40:39 -07:00
bjorn 99cb04f55b Clean up JNI references/arrays in lovrPlatformGetBundlePath; 2020-09-16 19:39:27 -07:00
bjorn 8f581df33c Properly cleanup local KeyEvent JNI references; 2020-09-16 19:36:32 -07:00
Josip Miskovic 62c4235448 Fix definition of HOME key on Android
There are two HOME keys defined in keycodes.h, the previously used
doesn't work and is labeled with the following comment: "This key
is handled by the framework and is never delivered to applications."
2020-09-08 17:23:17 +02:00
bjorn 5d659d0ac2 os_android: Add missing lovrPlatformSetSwapInterval; 2020-08-29 16:59:26 -06:00
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 17ce02d429 Fix OpenXR compile errors and add some android support; 2020-08-18 21:10:06 -06:00
bjorn 810086e1ba Make WindowFlags const in createWindow; 2020-08-17 00:55:12 -06:00
bjorn 438f7ef0d6 Add more Android keycodes; 2020-08-10 20:52:30 -06:00
bjorn 40594317c3 Android textinput event; 2020-08-08 12:36:09 -06:00
bjorn 682633d98b Add scancode and key repeat arguments to key events; 2020-08-07 14:15:45 -06:00
bjorn 1e30c0d93c Android key events; 2020-08-06 19:42:12 -06:00
bjorn 4160743b77 Fix desktop game packaging issue;
Accidentally hardcoded it to "assets" when updating Android.
2020-07-29 16:30:14 -06:00
bjorn 29f8365eed Clean up os_android and fix event polling issues; 2020-07-03 20:17:39 -06:00
bjorn 9777306b70 rm oculus mobile; 2020-07-02 10:46:10 -06:00
bjorn d8f7325bc7 lovr-oculus-mobile fixes; 2020-06-29 17:40:57 -06:00
bjorn afaae2febb Remaining android filesystem work; 2020-06-25 18:18:44 -06:00
bjorn b77276fd1f Android: make printf and print work; 2020-06-25 16:42:19 -06:00
bjorn 2042010b5b Move core/fs paths to core/os;
Usually these are more of a platform-specific concept, and they
don't really interact with files or do any io.

There is a little bit of duplication among the *nix platforms since
they're similar, but overall this organization feels a bit better.
2020-06-25 13:28:40 -06:00
bjorn 8b281d56e3 Android: Organize tup rules; Fix manifest; 2020-06-25 13:27:18 -06:00