From d695ca3cc9c38af71ca250e26cbfcc1c571943fc Mon Sep 17 00:00:00 2001 From: Cacodemon345 Date: Fri, 4 Mar 2022 14:00:24 +0600 Subject: [PATCH] qt: Don't normalize paths on non-Windows --- src/qt/qt_platform.cpp | 2 ++ src/sound/xaudio2.c | 1 + src/unix/unix.c | 5 +---- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/qt/qt_platform.cpp b/src/qt/qt_platform.cpp index 4ec31b842..0c399cd48 100644 --- a/src/qt/qt_platform.cpp +++ b/src/qt/qt_platform.cpp @@ -238,10 +238,12 @@ plat_path_abs(char *path) void plat_path_normalize(char* path) { +#ifdef Q_OS_WINDOWS while (*path++ != 0) { if (*path == '\\') *path = '/'; } +#endif } void diff --git a/src/sound/xaudio2.c b/src/sound/xaudio2.c index 114aa16da..c7e8dbf8f 100644 --- a/src/sound/xaudio2.c +++ b/src/sound/xaudio2.c @@ -178,6 +178,7 @@ inital() } initialized = 1; + atexit(closeal); } void diff --git a/src/unix/unix.c b/src/unix/unix.c index 83f6b4a9b..4e7e3602d 100644 --- a/src/unix/unix.c +++ b/src/unix/unix.c @@ -285,10 +285,7 @@ plat_path_abs(char *path) void plat_path_normalize(char* path) { - while (*path++ != 0) - { - if (*path == '\\') *path = '/'; - } + /* No-op. */ } void