shithub: rgbds

Download patch

ref: 2fb1eb91364347e1afae57314eee3279a1b1b7d0
parent: bde380f38b1d2a57d7d9aa35b7210a47085f41a7
author: ISSOtm <eldredhabert0@gmail.com>
date: Fri Mar 4 21:26:32 EST 2022

Print file paths in a platform-independent way

Conversion may be unspecified, but Windows better do the right thing (or else.)

--- a/src/gfx/main.cpp
+++ b/src/gfx/main.cpp
@@ -296,7 +296,13 @@
 		        options.maxNbTiles[0], options.maxNbTiles[1]);
 		auto printPath = [](char const *name, std::filesystem::path const &path) {
 			if (!path.empty()) {
-				fprintf(stderr, "\t%s: %s\n", name, path.c_str());
+#ifdef _MSC_VER
+	#define PRIpath "ls"
+#else
+	#define PRIpath "s"
+#endif
+				fprintf(stderr, "\t%s: %" PRIpath "\n", name, path.c_str());
+#undef PRIpath
 			}
 		};
 		printPath("Input image", options.input);