diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2009-06-29 11:49:35 +0000 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2009-06-29 11:49:35 +0000 |
commit | 719f75e218f027f28716192d357edd41dfaa7b67 (patch) | |
tree | e4dc151e729d70c8c37df39c0094e4fbda21bd50 /src/frontend_sdl.c | |
parent | 0ffe14dade5d2cf1d04e85386f7685383b02ca14 (diff) | |
download | libnsfb-719f75e218f027f28716192d357edd41dfaa7b67.tar.gz libnsfb-719f75e218f027f28716192d357edd41dfaa7b67.tar.bz2 |
Enable key repeat. Thanks to Bernd Roesch.
svn path=/trunk/libnsfb/; revision=8154
Diffstat (limited to 'src/frontend_sdl.c')
-rw-r--r-- | src/frontend_sdl.c | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/src/frontend_sdl.c b/src/frontend_sdl.c index f8837b5..92ae280 100644 --- a/src/frontend_sdl.c +++ b/src/frontend_sdl.c @@ -426,6 +426,7 @@ static int sdl_initialise(nsfb_t *nsfb) nsfb->linelen = sdl_screen->pitch; SDL_ShowCursor(SDL_DISABLE); + SDL_EnableKeyRepeat(300, 50); return 0; } @@ -540,16 +541,16 @@ static int sdl_claim(nsfb_t *nsfb, nsfb_bbox_t *box) { struct nsfb_cursor_s *cursor = nsfb->cursor; - if ((cursor != NULL) && - (cursor->plotted == true) && + if ((cursor != NULL) && + (cursor->plotted == true) && (nsfb_plot_bbox_intersect(box, &cursor->loc))) { - nsfb->plotter_fns->bitmap(nsfb, - &cursor->savloc, - cursor->sav, - cursor->sav_width, - cursor->sav_height, - cursor->sav_width, + nsfb->plotter_fns->bitmap(nsfb, + &cursor->savloc, + cursor->sav, + cursor->sav_width, + cursor->sav_height, + cursor->sav_width, false); cursor->plotted = false; } @@ -569,12 +570,12 @@ static int sdl_cursor(nsfb_t *nsfb, struct nsfb_cursor_s *cursor) nsfb->plotter_fns->set_clip(nsfb, &redraw); - nsfb->plotter_fns->bitmap(nsfb, - &cursor->savloc, - cursor->sav, - cursor->sav_width, - cursor->sav_height, - cursor->sav_width, + nsfb->plotter_fns->bitmap(nsfb, + &cursor->savloc, + cursor->sav, + cursor->sav_width, + cursor->sav_height, + cursor->sav_width, false); nsfb_cursor_plot(nsfb, cursor); |