We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 5086 - CMake builds on Windows broken by sensor support
Summary: CMake builds on Windows broken by sensor support
Status: ASSIGNED
Alias: None
Product: SDL
Classification: Unclassified
Component: *don't know* (show other bugs)
Version: HG 2.0
Hardware: x86_64 Windows 10
: P2 normal
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-04-12 19:04 UTC by DominikD
Modified: 2020-04-13 15:09 UTC (History)
0 users

See Also:


Attachments
sensor support in SDL_config.h.cmake + hack in SDL_windowssensor.c (1.69 KB, patch)
2020-04-12 19:04 UTC, DominikD
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description DominikD 2020-04-12 19:04:50 UTC
Created attachment 4303 [details]
sensor support in SDL_config.h.cmake + hack in SDL_windowssensor.c

CMakes on HG tip are currently broken (at least on Windows). There are three problems I've noticed:

1. Sensor support missing in `SDL_config.h.cmake`.
2. `SENSOR_DATA_TYPE_ANGULAR_VELOCITY_*_DEGREES_PER_SECOND` symbols duplication.
3. If SDL_SENSOR is disabled, dynapi build fails on sensor-related APIs.

The first one is easily fixable in the patch attached.
The second one would require `DEFINE_PROPERTYKEY` lines to be removed (I get them from `#include <Sensors.h>`) but I assume these were added for a reason. Ugly hack in the patch attached.
The last one may be something wrong I'm doing.

Given that sensor support seems to be very much WIP it's likely that tip will change before maintainers attend to this report. But I hope it's at least a little bit useful (don't know if any of you guys uses Windows as the default platform).
Comment 1 Sam Lantinga 2020-04-13 15:09:22 UTC
Thanks, your patch to SDL_config.h.cmake is in:
https://hg.libsdl.org/SDL/rev/0aea93477d09

I'll look more closely at why my Sensors.h doesn't define the angular velocity properties.