The original implementation tried to mimic the behavior of GLUT, which
treats mouse wheel as a button. SDL2, GLFW and NaCl all treat scroll
event separately, so it was quite nastily hacked in, with horizontal
scrolling ignored and scrolling offset treated as cursor position.
Moreover, wheel up/down buttons were confused with extra mouse buttons
in SDL2.
Now there is a dedicated MouseScrollEvent, which has just the offset and
modifiers, no cursor position. The original way with WheelUp/WheelDown
buttons in mouse press event is still preserved, though it is marked as
deprecated and will be removed in future release. Sdl2Application had
WheelUp/WheelDown buttons also for mouse move event, which was
completely useless (try moving a mouse while the wheel is rotating, ha),
so it's removed.
Scroll event offset is now also consistently Vector2 across all toolkits
-- it was integer in SDL2, float in NaCl and double in GLFW.
The X1 and X2 buttons in Sdl2Application are not confused with wheel
up/down anymore and are a new Mouse*Event::Button::X1 and
Mouse*Event::Button::X2 enums -- on my mouse they are actually wheel
left and wheel right (though wheel left and wheel right is not treated
as horizontal scrolling, weird).
With -O2 the test works, but with -O1 the compiler complains about
missing instruction. I guess -O2 just optimizes it away in this
particular case, so the safe option is to not use it at all.
The docs weren't correct in 90% cases -- mainly in case of
createContext() function, docs of which were extended to clearly specify
what's done inside.
Otherwise the ANativeActivity_onCreate() won't get exported and the
app will fail to start. Of course they just don't care and produce
crappy code that apparently nobody uses in production environment.
What's done:
* The build matrix now has four targets -- Linux desktop, OSX desktop,
iOS GLES2 and iOS GLES3.
* Putting the commands into separate bash scripts, which are called
based on what's the actual build matrix item.
* Displaying *all* test output (colored) for visual verification.