diff --git a/wgpu/backends/wgpu_native/_ffi.py b/wgpu/backends/wgpu_native/_ffi.py index 00a76dd5..2cc34397 100644 --- a/wgpu/backends/wgpu_native/_ffi.py +++ b/wgpu/backends/wgpu_native/_ffi.py @@ -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 = []