improve zooming on web

isolation_bkp/dynres
Dominik Madarász 2022-09-11 20:42:37 +00:00 committed by GitHub
parent 80df7758cc
commit 1411fad9eb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -136,6 +136,9 @@ void platform_input_update_input_frame(game_keystate_data data) {
void platform_input() { void platform_input() {
float mouse_z = (GetMouseWheelMove()*0.5f); float mouse_z = (GetMouseWheelMove()*0.5f);
#if defined(PLATFORM_WEB)
mouse_z *= 30.0f;
#endif
if (mouse_z != 0.0f) { if (mouse_z != 0.0f) {
target_zoom = zpl_clamp(target_zoom+mouse_z, 0.1f, 10.0f); target_zoom = zpl_clamp(target_zoom+mouse_z, 0.1f, 10.0f);