Fixed typo, caused small scroll bug.

This commit is contained in:
Ole Loots 2012-11-22 01:30:03 +01:00
parent 407389668b
commit 6ea22068aa
1 changed files with 3 additions and 3 deletions

View File

@ -151,12 +151,12 @@ static short preproc_wm(GUIWIN * gw, EVMULT_OUT *ev_out, short msg[8])
wind_set(gw->handle, WF_HSLIDE, msg[4], 0, 0, 0);
slid = guiwin_get_scroll_info(gw);
val = (float)(slid->x_units-(g.g_w/slid->x_unit_px))/1000*(float)msg[4];
if(val != slid->y_pos) {
if(val != slid->x_pos) {
if (val < slid->x_pos) {
val = -(slid->x_pos - val);
val = -(MAX(0, slid->x_pos-val));
}
else {
val = val -slid->x_pos;
val = val-slid->x_pos;
}
preproc_scroll(gw, GUIWIN_HSLIDER, val, false);
}