diff --git a/TODO b/TODO index 231df69..e6c375f 100644 --- a/TODO +++ b/TODO @@ -11,7 +11,8 @@ Tests to run. * bopti: more sizes, gray * topti: all charsets, colors -Completeness elements on existing code. +Complementary elements on existing code. +* dma: dma_memcpy() and dma_memset(), possibly requiring alignment * core: use topti in the error message for missing mappings * core: find the #ifdef FX9860G|FXCG50 that have a cross-platform def * topti: support Unicode fonts diff --git a/src/keysc/getkey.c b/src/keysc/getkey.c index 73d0ec9..2f420c8 100644 --- a/src/keysc/getkey.c +++ b/src/keysc/getkey.c @@ -12,7 +12,7 @@ /* Delay between a key press and the first repeat, in scan intervals */ static int rep_first = 64; /* Delay between subsequent repeats, in scan intervals */ -static int rep_next = 16; +static int rep_next = 8; /* getkey() - wait for a pressed key */ key_event_t getkey(void) @@ -95,7 +95,11 @@ key_event_t getkey_opt(int opt, volatile int *timeout) arrow)) break; /* If the key is key pressed long enough, create a new event */ - if(++rep_time < (rep_count ? rep_next : rep_first)) break; + int target = (rep_count) ? rep_next : rep_first; + if(++rep_time < target) break; + + rep_time -= target; + rep_count++; ev.mod = 1; ev.shift = shift; diff --git a/src/keysc/keysc.c b/src/keysc/keysc.c index 094e681..fc159aa 100644 --- a/src/keysc/keysc.c +++ b/src/keysc/keysc.c @@ -184,7 +184,7 @@ static void init(void) if(!delay) delay = 1; /* Set the default repeat times (milliseconds) */ - getkey_repeat(500, 125); + getkey_repeat(400, 40); timer_setup(tid, delay, 0, callback, NULL); timer_start(tid); diff --git a/src/render/topti.c b/src/render/topti.c index 8db4d93..6364cab 100644 --- a/src/render/topti.c +++ b/src/render/topti.c @@ -2,7 +2,7 @@ #include #include -/* These parameters will eventually be specified by the font */ +/* TODO: These parameters will eventually be specified by the font */ #define CHAR_SPACING 1 #define PROP_SPACING 5 diff --git a/src/std/stdio.c b/src/std/stdio.c index d7a416b..d733073 100644 --- a/src/std/stdio.c +++ b/src/std/stdio.c @@ -547,7 +547,7 @@ static void kformat_fixed(KFORMAT_ARGS) for(int i = g.content - 2; i >= 0; i--) { - if(i == opt->precision) kprint_out('.'); + if(i == opt->precision - 1) kprint_out('.'); kprint_out(digits[i]); }