summaryrefslogtreecommitdiff
path: root/src/interface.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/interface.c')
-rw-r--r--src/interface.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/interface.c b/src/interface.c
index 07355a4..d453a10 100644
--- a/src/interface.c
+++ b/src/interface.c
@@ -3858,12 +3858,13 @@ char *console_ui(pixel *vid_buf,char error[255],char console_more) {
ed.cursor = 0;
//fillrect(vid_buf, -1, -1, XRES, 220, 0, 0, 0, 190);
memcpy(old_buf,vid_buf,(XRES+BARSIZE)*YRES*PIXELSIZE);
- fillrect(old_buf, -1, -1, XRES, 220, 0, 0, 0, 190);
+ fillrect(old_buf, -1, -1, XRES+1, 220, 0, 0, 0, 190);
currentcommand2 = malloc(sizeof(command_history));
memset(currentcommand2, 0, sizeof(command_history));
currentcommand2->prev_command = last_command2;
currentcommand2->command = mystrdup(error);
last_command2 = currentcommand2;
+ SDL_EnableKeyRepeat(SDL_DEFAULT_REPEAT_DELAY, SDL_DEFAULT_REPEAT_INTERVAL);
cc = 0;
while(cc < 80){
fillrect(old_buf, -1, -1+cc, XRES+BARSIZE, 2, 0, 0, 0, 160-(cc*2));
@@ -3945,12 +3946,14 @@ char *console_ui(pixel *vid_buf,char error[255],char console_more) {
currentcommand->command = mystrdup(ed.str);
last_command = currentcommand;
free(old_buf);
+ SDL_EnableKeyRepeat(0, SDL_DEFAULT_REPEAT_INTERVAL);
return currentcommand->command;
}
if (sdl_key==SDLK_ESCAPE || sdl_key==SDLK_BACKQUOTE)
{
console_mode = 0;
free(old_buf);
+ SDL_EnableKeyRepeat(0, SDL_DEFAULT_REPEAT_INTERVAL);
return NULL;
}
if(sdl_key==SDLK_UP || sdl_key==SDLK_DOWN)
@@ -3987,6 +3990,7 @@ char *console_ui(pixel *vid_buf,char error[255],char console_more) {
}
console_mode = 0;
free(old_buf);
+ SDL_EnableKeyRepeat(0, SDL_DEFAULT_REPEAT_INTERVAL);
return NULL;
}