((char*)Buffer)[pos] = term->InputBuffer[term->InputRead];
pos ++;
term->InputRead ++;
- while(term->InputRead > MAX_INPUT_CHARS8)
+ while(term->InputRead >= MAX_INPUT_CHARS8)
term->InputRead -= MAX_INPUT_CHARS8;
}
break;
avail = term->InputWrite - term->InputRead;
if(avail < 0)
avail += MAX_INPUT_CHARS32;
+ Length /= 4;
if(avail > Length - pos)
- avail = Length/4 - pos;
+ avail = Length - pos;
codepoint_in = (void*)term->InputBuffer;
codepoint_buf = Buffer;
codepoint_buf[pos] = codepoint_in[term->InputRead];
pos ++;
term->InputRead ++;
- while(term->InputRead > MAX_INPUT_CHARS32)
+ while(term->InputRead >= MAX_INPUT_CHARS32)
term->InputRead -= MAX_INPUT_CHARS32;
}
pos *= 4;
{
// Encode the raw key event
Uint32 *raw_in = (void*)term->InputBuffer;
+
+ #if 0
+ // Drop new keys
+ if( term->InputWrite == term->InputRead )
+ return ;
+ #endif
+
raw_in[ term->InputWrite ] = Codepoint;
term->InputWrite ++;
- term->InputWrite %= MAX_INPUT_CHARS32;
+ if(term->InputWrite >= MAX_INPUT_CHARS32)
+ term->InputWrite -= MAX_INPUT_CHARS32;
+
+ #if 1
+ // TODO: Should old or new be dropped?
if(term->InputRead == term->InputWrite) {
term->InputRead ++;
- term->InputRead %= MAX_INPUT_CHARS32;
+ if( term->InputRead >= MAX_INPUT_CHARS32 )
+ term->InputRead -= MAX_INPUT_CHARS32;
}
+ #endif
}
VFS_MarkAvaliable(&term->Node, 1);
if(argc != 1) break;
switch(args[0])
{
+ case 25:
+ Term->Flags &= ~VT_FLAG_HIDECSR;
+ break;
case 1047:
VT_int_ToggleAltBuffer(Term, 1);
break;
if(argc != 1) break;
switch(args[0])
{
+ case 25:
+ Term->Flags |= VT_FLAG_HIDECSR;
+ break;
case 1047:
VT_int_ToggleAltBuffer(Term, 0);
break;
/*10*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, KEY_KPENTER, KEY_RCTRL, 0, 0,\r
/*20*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\r
/*30*/ 0, 0, 0, 0, 0, KEY_KPSLASH, 0, 0, KEY_RALT, 0, 0, 0, 0, 0, 0, 0,\r
-/*40*/ 0, 0, 0, 0, 0, 0, 0, KEY_HOME,\r
- KEY_UP, KEY_PGUP, 0, KEY_LEFT, 0, KEY_RIGHT, 0, KEY_END,\r
-/*50*/ KEY_DOWN, KEY_PGDOWN, KEY_INS, KEY_DEL, 0, 0, 0, 0,\r
- 0, 0, KEY_WIN, 0, 0, KEY_MENU, 0, 0,\r
+/*40*/ 0, 0, 0, 0, 0, 0, 0, KEY_HOME, KEY_UP, KEY_PGUP, 0, KEY_LEFT, 0, KEY_RIGHT, 0, KEY_END,\r
+/*50*/ KEY_DOWN, KEY_PGDOWN, KEY_INS, KEY_DEL, 0, 0, 0, 0, 0, 0, 0, KEY_LWIN, KEY_RWIN, KEY_MENU, 0, 0,\r
/*60*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\r
/*70*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\r
};\r