Create SFVARN_BOOL

This commit is contained in:
twinaphex 2020-10-04 14:39:43 +02:00
parent 7c8435422e
commit 17dd003d5c
2 changed files with 3 additions and 5 deletions

View File

@ -1,10 +1,8 @@
#ifndef _STATE_IN_HPP
#define _STATE_IN_HPP
INLINE bool SF_IS_BOOL(bool *) { return(1); }
INLINE bool SF_IS_BOOL(void *) { return(0); }
#define SFVARN(x, n) { &(x), SF_IS_BOOL(&(x)) ? 1 : (uint32_t)sizeof(x), MDFNSTATE_RLSB | (SF_IS_BOOL(&(x)) ? MDFNSTATE_BOOL : 0), n }
#define SFVARN_BOOL(x, n) { &(x), 1, MDFNSTATE_RLSB | MDFNSTATE_BOOL, n }
#define SFVARN(x, n) { &(x), (uint32_t)sizeof(x), MDFNSTATE_RLSB, n }
#define SFVAR(x) SFVARN((x), #x)
#define SFARRAYN(x, l, n) { (x), (uint32_t)(l), 0, n }

View File

@ -1155,7 +1155,7 @@ extern "C" int v30mz_StateAction(StateMem *sm, int load, int data_only)
SFARRAY16N(I.sregs, 4, "sregs"),
SFVARN(v30mz_ICount, "ICount"),
SFVARN(InHLT, "InHLT"),
SFVARN_BOOL(InHLT, "InHLT"),
SFVARN(prefix_base, "prefix_base"),
SFVARN(seg_prefix, "seg_prefix"),
SFVARN(PSW, "PSW"),