Fix horizontal wheel scroll direction.

This commit is contained in:
Bartosz Taudul 2024-09-19 20:53:44 +02:00
parent 07995f0222
commit f971faab58
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3

View File

@ -200,7 +200,7 @@ Backend::Backend( const char* title, const std::function<void()>& redraw, const
return EM_TRUE; return EM_TRUE;
} ); } );
emscripten_set_wheel_callback( "#canvas", nullptr, EM_TRUE, []( int, const EmscriptenWheelEvent* e, void* ) -> EM_BOOL { emscripten_set_wheel_callback( "#canvas", nullptr, EM_TRUE, []( int, const EmscriptenWheelEvent* e, void* ) -> EM_BOOL {
ImGui::GetIO().AddMouseWheelEvent( e->deltaX, -e->deltaY ); ImGui::GetIO().AddMouseWheelEvent( -e->deltaX, -e->deltaY );
tracy::s_wasActive = true; tracy::s_wasActive = true;
return EM_TRUE; return EM_TRUE;
} ); } );