All: Correct more format strings on Windows (fixes #1817)
Vicki Pfau vi@endrift.com
Sat, 11 Jul 2020 15:34:45 -0700
3 files changed,
9 insertions(+),
0 deletions(-)
M
CHANGES
→
CHANGES
@@ -9,6 +9,7 @@ - GBA BIOS: Fix reloading video registers after reset (fixes mgba.io/i/1808)
- GBA Video: Fix invalid read in mode 4 mosaic Other fixes: - All: Correct format strings for some numbers on Windows (fixes mgba.io/i/1794) + - All: Correct more format strings on Windows (fixes mgba.io/i/1817) - GB Core: Fix extracting SRAM when none is present - GBA Savedata: Fix extracting save when not yet configured in-game - Qt: Fix file handle leak on opening an invalid ROM
M
CMakeLists.txt
→
CMakeLists.txt
@@ -17,6 +17,10 @@ elseif(CMAKE_C_COMPILER_ID STREQUAL "GNU" AND CMAKE_COMPILER_VERSION VERSION_LESS "4.3")
set(GCC_STD "gnu99") endif() set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wno-missing-field-initializers -std=${GCC_STD}") + if(WIN32) + # mingw32 likes to complain about using the "wrong" format strings despite them actually working + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-format") + endif() else() set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_CRT_SECURE_NO_WARNINGS /wd4003 /wd4244 /wd4146") endif()
M
include/mgba-util/common.h
→
include/mgba-util/common.h
@@ -14,6 +14,10 @@ #define CXX_GUARD_START
#define CXX_GUARD_END #endif +#ifdef __MINGW32__ +#define __USE_MINGW_ANSI_STDIO 1 +#endif + CXX_GUARD_START #include <ctype.h>