This seems to have been the cause of some crashes and weird behavior with the new command console.
Likely the problem came from the wrong pointer being removed from the ows, but exactly why a modal
dialog was even being opened I don't know.
Still, this is a safer method overall and it guarantees the correct pointer is always removed.
[ci skip]
Turns out the reason I couldn't make mouse wheels trigger the unhandled event warnings was that SDL2
no longer treats mouse wheels as buttons and no longer sends SDL_BUTTONDOWN events for them.
This adds support for passing raw SDL events throught the GUI2
event system in order to allow for hotkey creation in the GUI2 hotkey
dialog. The dialog in turn uses the raw SDL event to query the hotkey
subsystem whether it's a suitable event to create a hotkey from or not.
The first suitable event is used to create a hotkey.
`SDL_TEXTINPUT` events were being handled after `SDL_KEYDOWN` events and calling the same `key_down` codepath,
result in any registered `SDL_KEY_DOWN` callbacks being executed twice, the second time around with null/0 'key'
data.
This commit still doesn't fix all of them. I decided to leave alone
cases where variables with the same name are assigned in multiple
conditions of the same if...else if...else statement, and cases where a
scope logging macro is used multiple times in the same scope. In any
case, this commit greatly reduces the warning count on MSVC2015 and makes
new warnings much easier to spot.