mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
Print file paths in a platform-independent way
Conversion may be unspecified, but Windows better do the right thing (or else.)
This commit is contained in:
@@ -296,7 +296,13 @@ int main(int argc, char *argv[]) {
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user