twinaphex/genesis-next — comment on commit bce300cfdc1d18154544905d2f8fd934de1a55f4
File:  line 0
By ekeeke:

Not sure why you did that but I'm pretty sure the first save_param call will now crash on LIBSNES because state is not initialized.
Anyway, can someone finally explain me why state.c need to be modified that way for LIBSNES ? All I see in libsnes.c is this code:

EXPORT bool snes_serialize(uint8_t *data, unsigned size)
{
if (size != STATE_SIZE)
return FALSE;

state_save(data);

return TRUE;
}

EXPORT bool snes_unserialize(const uint8_t *data, unsigned size)
{
if (size != STATE_SIZE)
return FALSE;

state_load((uint8_t*)data);

return TRUE;
}

I hardly understand how my original implementation can be incompatible with that:

extern int state_load(unsigned char *state);
extern int state_save(unsigned char *state);

?

As for the include in m68kops.h, just do like I said in the other comments, leave it but remove include to in m68k.h and it should work with every compiler. If it doesn't, please tell me so we can find a clean solution (just to be clear, having to add special defines for stuff like that is not a clean solution)