X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Fdos%2Fmain.c;h=4a3dc1a79e962c5cac42e1420a78e628be1f6c81;hb=refs%2Fheads%2Fmaster;hp=72b666ee3c1c651272f7c268bcb7e7f888f71990;hpb=a77883f4cefd1af3d71588871ef27e81a49194d8;p=eradicate diff --git a/src/dos/main.c b/src/dos/main.c index 72b666e..4a3dc1a 100644 --- a/src/dos/main.c +++ b/src/dos/main.c @@ -44,7 +44,7 @@ int main(int argc, char **argv) status = -1; goto break_evloop; } - fb_pixels = (char*)fb_buf + vmode->pitch; + fb_pixels = (uint16_t*)((char*)fb_buf + vmode->pitch); if(init(argc, argv) == -1) { status = -1; @@ -55,10 +55,15 @@ int main(int argc, char **argv) for(;;) { int key; - while((key = kb_getkey()) != -1) { - if(key == 27) goto break_evloop; + if(key_event) { + while((key = kb_getkey()) != -1) { + key_event(key, 1); + } + } else { + while((key = kb_getkey()) != -1) { + if(key == 27) goto break_evloop; + } } - if(quit) goto break_evloop; time_msec = get_msec();