Skip to content

Commit

Permalink
FastSaveStates: Resolve linker error on msvc 2019 toolchain
Browse files Browse the repository at this point in the history
 * Replace C bool macro with _Bool compiler type
 * C99 _Bool and C++ bool are considered matching types by the compiler
  • Loading branch information
jstine35 committed May 23, 2021
1 parent a0ad17d commit b2dd3ec
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion libretro.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ retro_input_state_t dbg_input_state_cb = 0;
#endif /* HAVE_LIGHTREC */

//Fast Save States exclude string labels from variables in the savestate, and are at least 20% faster.
extern bool FastSaveStates;
extern "C" bool FastSaveStates;
const int DEFAULT_STATE_SIZE = 16 * 1024 * 1024;

static bool libretro_supports_bitmasks = false;
Expand Down
2 changes: 1 addition & 1 deletion mednafen/state.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ int StateAction(StateMem *sm, int load, int data_only);
* variables in the savestate, and are at least 20% faster.
* Only used for internal savestates which will not be written to a file. */

bool FastSaveStates = false;
_Bool FastSaveStates = false;

static INLINE void MDFN_en32lsb_(uint8_t *buf, uint32_t morp)
{
Expand Down

0 comments on commit b2dd3ec

Please sign in to comment.