Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMake builds on Windows broken by sensor support #3636

Closed
SDLBugzilla opened this issue Feb 11, 2021 · 1 comment
Closed

CMake builds on Windows broken by sensor support #3636

SDLBugzilla opened this issue Feb 11, 2021 · 1 comment
Assignees
Milestone

Comments

@SDLBugzilla
Copy link
Collaborator

This bug report was migrated from our old Bugzilla tracker.

These attachments are available in the static archive:

Reported in version: HG 2.0
Reported for operating system, platform: Windows 10, x86_64

Comments on the original bug report:

On 2020-04-12 19:04:50 +0000, DominikD wrote:

Created attachment 4303
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).

On 2020-04-13 15:09:22 +0000, Sam Lantinga wrote:

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.

@slouken slouken removed the bug label May 11, 2022
@slouken slouken added this to the 2.24.0 milestone May 24, 2022
@madebr
Copy link
Contributor

madebr commented Jun 15, 2022

  1. Sensor support missing in SDL_config.h.cmake.

already fixed

  1. SENSOR_DATA_TYPE_ANGULAR_VELOCITY_*_DEGREES_PER_SECOND symbols duplication.

DEFINE_PROPERTYKEY(SDL_SENSOR_DATA_TYPE_ANGULAR_VELOCITY_X_DEGREES_PER_SECOND, 0X3F8A69A2, 0X7C5, 0X4E48, 0XA9, 0X65, 0XCD, 0X79, 0X7A, 0XAB, 0X56, 0XD5, 10); //[VT_R8]
DEFINE_PROPERTYKEY(SDL_SENSOR_DATA_TYPE_ANGULAR_VELOCITY_Y_DEGREES_PER_SECOND, 0X3F8A69A2, 0X7C5, 0X4E48, 0XA9, 0X65, 0XCD, 0X79, 0X7A, 0XAB, 0X56, 0XD5, 11); //[VT_R8]
DEFINE_PROPERTYKEY(SDL_SENSOR_DATA_TYPE_ANGULAR_VELOCITY_Z_DEGREES_PER_SECOND, 0X3F8A69A2, 0X7C5, 0X4E48, 0XA9, 0X65, 0XCD, 0X79, 0X7A, 0XAB, 0X56, 0XD5, 12); //[VT_R8]

Current master has added a SDL_ prefix, thus avoiding a symbol clash.

  1. If SDL_SENSOR is disabled, dynapi build fails on sensor-related APIs.

I am able to build using MinGW with -DSDL_SENSOR=OFF,
so I think this problem has been fixed in the mean time.

@madebr madebr closed this as completed Jun 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants