- Add new touch device type enum ("touchscreen", "touchpad", "touchpadrelative"). Coordinates for touchscreens are window-relative DPI-scaled pixels, and coordinates for touchpads are normalized [0, 1] values.
- Add new devicetype enum and ismouse boolean params to touch callbacks.
- Add love.touch.getDeviceType(touchid), love.touch.isMouse(touchid), and optional device type filter param for love.touch.getTouches.
- Add t.trackpadtouch boolean (defaults to false) to love.conf. Trackpad touch events will not be generated unless it's enabled.
Currently the trackpadtouch setting only works on macOS.
Resolves#1633.
Resolves#2093.
Which means everything still mostly behaves the same, except we now have
cmake targets which we can manipulate, rather than a bunch of global
variables.
For ease of use I've matched the existing variables, so love.event is
split into love_event_root and love_event_sdl, and there is a separate
(pseudo) target love_event which combines them both.
I have also simplified the windows-specific additions to liblove.
Instead of altering the variables, they now just add to the liblove
target.
Unfortunately, it does mean we lose the global include directory list,
so we need to add dependencies on a per-module basis. The upside is that
this more accurately models the dependencies. If you remove a module,
its dependencies should now automatically go unused.
Not the most beautiful system, but provides us with a simple way to
unify megasource and non-megasource builds.
Also replaces LOVE_LUA_LIBRARY, since we now have a target to name.
It just re-implemented target_compile_options.
While I was editing it anyway, call it closer to the target definition,
so it's easier to find.
And as it turns out, after diffing, love_disable_warnings only disabled
warnings on the first target anyway, so I guess this fixes a "bug".
They (mostly) called add_library anyway, the extra indirection of all
those variables had no real value.
For header-only libraries I've left the definitions in there, in
comments. That may not do anything, but the previous definition of
unused variables had no effect either.
That means we can still change the target name, while having consistent names throughout the file.
And while I'm at it, deal with the version number in the library name for linux in the same code path.
Also upgrade the variables to cache variables, so you can easily change the names. This was previously impossible because they were target names.
Not necessarily needed yet, but given our target platforms, this seems
like a sane minimum version. Also means we don't need the separate
policy settings, since the new minimum version already enables the new
behaviour.
* Compiling without find_package(OpenGL REQUIRED) has no side-effect because LOVE uses SDL to load OpenGL. GLAD is used to as substitute for OpenGL headers too.
* Mpg123 is no longer used in LOVE 12. Remove the respective CMake module.
* CMake has its own FindOpenAL.cmake script. There's no need to provide our own.
And automatically get the timestamp for the changelog too.
That does require an update to cmake 3.7, but as far as I can tell we never use a cmake version older than 3.16 (ubuntu 20.04).