diff options
-rw-r--r-- | riscos/window.c | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/riscos/window.c b/riscos/window.c index 8dbfab639..0489a47c3 100644 --- a/riscos/window.c +++ b/riscos/window.c @@ -3128,43 +3128,40 @@ void ro_gui_window_scroll_action(struct gui_window *g, if (!handled && g->bw->children == NULL) { switch (step_x) { case SCROLL_TOP: - step_x = -0x10000000; + state.xscroll -= 0x10000000; break; case SCROLL_BOTTOM: - step_x = 0x10000000; + state.xscroll += 0x10000000; break; case SCROLL_PAGE_UP: - step_x = - visible_x; + state.xscroll -= visible_x; break; case SCROLL_PAGE_DOWN: - step_x = visible_x; + state.xscroll += visible_x; break; default: - step_x = 2 * step_x; + state.xscroll += 2 * step_x; break; } switch (step_y) { case SCROLL_TOP: - step_y = 0x10000000; + state.yscroll += 0x10000000; break; case SCROLL_BOTTOM: - step_y = -0x10000000; + state.yscroll -= 0x10000000; break; case SCROLL_PAGE_UP: - step_y = visible_y; + state.yscroll += visible_y; break; case SCROLL_PAGE_DOWN: - step_y = -visible_y; + state.yscroll -= visible_y; break; default: - step_y = -2 * step_y; + state.yscroll -= 2 * step_y; break; } - state.xscroll += step_x; - state.yscroll += step_y; - error = xwimp_open_window((wimp_open *) &state); if (error) { LOG(("xwimp_open_window: 0x%x: %s", |