SDL 3.4.16 build fails for Xbox Scarlet & Xbox One (GDK)

Open Beginner friendly
#16,360 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
72/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
c

Research direction

Start with src/gpu/d3d12/SDL_gpu_d3d12.c at line 1962 and inspect the D3D12_RESOURCE_STATES initialization reported by the GDK compiler. Reproduce the build for Gaming.Xbox.Scarlett.x64 or Gaming.Xbox.XboxOne.x64, then verify that both targets compile successfully.

Written by the indexing model from the issue text.

Description

Building the library with GDK for Gaming.Xbox.Scarlett.x64 or Gaming.Xbox.XboxOne.x64 throws the following error:

1>SDL_gpu_d3d12.c 1>Z:\pixel\resources\SDL\21092026\SDL-release-3.4.16\src\gpu\d3d12\SDL_gpu_d3d12.c(1962,34): error C2440: 'initializing': cannot convert from 'int' to 'D3D12_RESOURCE_STATES' 1> Z:\pixel\resources\SDL\21092026\SDL-release-3.4.16\src\gpu\d3d12\SDL_gpu_d3d12.c(1962,34): 1> Conversion to enumeration type requires an explicit cast (static_cast, C-style cast or parenthesized function-style cast) 1>Generating Code... 1>Done building project "SDL.vcxproj" -- FAILED. ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

The error was not happening a few months back so it might relate to a recent change.

Dominant language
C
Stars
16.6k
Forks
3k
Avg merge
15h 40m
Merged PRs (30d)
70

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from libsdl-org/SDL

All issues in libsdl-org/SDL

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.