From f6b8f9801cc7cab3eaca2b14870aac2f80065851 Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Sat, 20 Jun 2020 03:02:27 -0700 Subject: [PATCH] All: Correct format strings for some numbers on Windows (fixes #1794) --- CHANGES | 1 + include/mgba-util/common.h | 6 ++---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/CHANGES b/CHANGES index ab2158451..b9b35b16f 100644 --- a/CHANGES +++ b/CHANGES @@ -4,6 +4,7 @@ Emulation fixes: - GB MBC: Fix MBC1 RAM enable bit selection - GB MBC: Fix MBC2 bit selection Other fixes: + - All: Correct format strings for some numbers on Windows (fixes mgba.io/i/1794) - GB Core: Fix extracting SRAM when none is present - GBA Savedata: Fix extracting save when not yet configured in-game Misc: diff --git a/include/mgba-util/common.h b/include/mgba-util/common.h index 1934ed87b..9dd1f6046 100644 --- a/include/mgba-util/common.h +++ b/include/mgba-util/common.h @@ -120,10 +120,8 @@ typedef intptr_t ssize_t; #if defined(_3DS) || defined(GEKKO) || defined(PSP2) // newlib doesn't support %z properly by default #define PRIz "" -#elif defined(_WIN64) -#define PRIz "I64" -#elif defined(_WIN32) -#define PRIz "" +#elif defined(_MSC_VER) +#define PRIz "I" #else #define PRIz "z" #endif