Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion wgpu/backends/wgpu_native/_ffi.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,13 @@ def _get_wgpu_header(*filenames):
lines1 = []
for filename in filenames:
with open(filename, "rb") as f:
lines1.extend(f.read().decode().replace("\\\n", "").splitlines(True))
lines1.extend(
f.read()
.decode()
.replace("\r\n", "\n")
.replace("\\\n", "")
.splitlines(True)
)
# Deal with pre-processor commands, because cffi cannot handle them.
# Just removing them, plus a few extra lines, seems to do the trick.
lines2 = []
Expand Down