1
0
Fork 0

Don't initialize and manage joysticks in SDLmain

Two notable changes:

1. Eliminates the joystick setup from SDLmain, allowing
the mapper's QueryJoysticks() function to be the sole
setup and configuration point for both the SDL Joystick
subsystem and DOSBox's internal configuration of the
joysticks.

2. SDLmain's event loop previously perform some joystick-
specific timing and always called the Mapper's UpdateJoysticks
function; neither of which are needed if the user has disabled
joystick support or if joysticks aren't physically present.
This update now make this entire process conditional on both
of the latter (which is set by the Mapper's QueryJoysticks).
This commit is contained in:
krcroft 2020-04-19 11:49:15 -07:00 committed by Patryk Obara
parent 5b587d490f
commit 5287559aee
3 changed files with 19 additions and 21 deletions

View file

@ -36,7 +36,8 @@ void MAPPER_BindKeys();
void MAPPER_StartUp(Section * sec);
void MAPPER_Run(bool pressed);
void MAPPER_DisplayUI();
void MAPPER_LosingFocus(void);
void MAPPER_LosingFocus();
bool MAPPER_IsUsingJoysticks();
std::vector<std::string> MAPPER_GetEventNames(const std::string &prefix);
void MAPPER_AutoType(std::vector<std::string> &sequence,
const uint32_t wait_ms,