SDL: build: Consistently use pathlib APIs in cmake/xxd.py

From 9be9e2292b0fffb886ca7d68126f943185f6788e Mon Sep 17 00:00:00 2001
From: Simon McVittie <[EMAIL REDACTED]>
Date: Wed, 9 Aug 2023 14:38:59 +0100
Subject: [PATCH] build: Consistently use pathlib APIs in cmake/xxd.py

The ability to pass a pathlib.Path to open() was new in Python 3.6,
and the oldest branch of the Steam Runtime only has Python 3.5 available.
Even without considering retrocomputing, using the Path.open method is
more consistent with how we read the input 2 lines earlier.

Signed-off-by: Simon McVittie <smcv@collabora.com>
---
 cmake/xxd.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cmake/xxd.py b/cmake/xxd.py
index 27afbcd383ad..5254cd1f70a7 100755
--- a/cmake/xxd.py
+++ b/cmake/xxd.py
@@ -17,7 +17,7 @@ def main():
 
     binary_data = args.input.open("rb").read()
 
-    with open(args.output, "w") as fout:
+    with args.output.open("w") as fout:
         fout.write("unsigned char {}[] = {{\n".format(varname))
         bytes_written = 0
         while bytes_written < len(binary_data):