From 719f75e218f027f28716192d357edd41dfaa7b67 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Mon, 29 Jun 2009 11:49:35 +0000 Subject: Enable key repeat. Thanks to Bernd Roesch. svn path=/trunk/libnsfb/; revision=8154 --- src/frontend_sdl.c | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) (limited to 'src/frontend_sdl.c') 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); -- cgit v1.2.3