* Refactored the way RetroArch sets the input state/poll callbacks, hopefully it's clearer now.
* The unnamed enum of poll type behaviors in core.h was moved to retroarch.h and is now named rarch_poll_type.
It represents polling behaviors implemented specifically by RetroArch.
First element starts at 1 to match the data encoding of RETRO_ENVIRONMENT_POLL_TYPE_OVERRIDE.
* Created rarch_set_input_cbs - sets different input state/poll callbacks based on a
rarch_poll_type parameter.
* Replaced the static variable core_poll_type_override in retroarch.c with a poll_type_lock flag
inside global_t's menu struct;
RETRO_ENVIRONMENT_POLL_TYPE_OVERRIDE will now call rarch_set_input_cbs and set poll_type_lock,
which blocks the user from changing behaviors from the menu.
* To follow the RETRO_ENVIRONMENT_POLL_TYPE_OVERRIDE spec, we now set poll_type_lock and call
rarch_set_input_cbs after calling unload_game.
* core_set/unset_netplay_callbacks will now set/unset poll_type_lock, preventing the
poll type from being changed by the user;
* The MENU_ENUM_LABEL_INPUT_POLL_TYPE_BEHAVIOR action will now call rarch_set_input_cbs if poll_type_lock
isn't set, which means poll type is changed on-the-fly.
should now be self-contained in one file. Allows us to
turn more functions static, remove more extraneous functions
that just consisted of a single line (mostly getters/setters), etc.
In particular, we need to disentangle the interceding netplay callbacks.
In previous versions, if you disconnected netplay but were using a core
that made netplay stall for connections (i.e., one that has no
savestates), netplay would continue to stall because it still
interceded, even though it was supposed to be off. This fixes that.
The new environment RETRO_ENVIRONMENT_SET_SERIALIZATION_QUIRKS allows
cores to communicate any quirks their implementation of serialization
may exhibit. This is useful for distinguishing between serialization
implementations that are sufficient for netplay, rewind, regular use,
etc, as each of these have different requirements and it should be
possible to support a "good enough" serialization without breaking
frontend features.
In this first cut, Netplay can be enabled "mid-stream", but not much
else is supported. Client reconnection and either-side disconnection are
listed in the menu but don't yet do anything.