* lower alt+m2 (2d zoom) sensitivity

This commit is contained in:
Garux 2018-04-14 18:12:52 +03:00
parent 3ae4188e3d
commit d636107f68

View File

@ -1442,21 +1442,17 @@ int g_zoom2y = 0;
void XYWnd_zoomDelta( int x, int y, unsigned int state, void* data ){
if ( y != 0 ) {
g_dragZoom += y;
while ( abs( g_dragZoom ) > 8 )
const int threshold = 16;
while ( abs( g_dragZoom ) > threshold )
{
if ( g_dragZoom > 0 ) {
reinterpret_cast<XYWnd*>( data )->ZoomOut();
g_dragZoom -= 8;
g_dragZoom -= threshold;
}
else
{
if ( g_xywindow_globals.m_bZoomInToPointer ) {
reinterpret_cast<XYWnd*>( data )->ZoomInWithMouse( g_zoom2x, g_zoom2y );
}
else{
reinterpret_cast<XYWnd*>( data )->ZoomIn();
}
g_dragZoom += 8;
g_dragZoom += threshold;
}
}
}