X-Git-Url: https://hackdaworld.org/gitweb/?p=physik%2Fnlsop.git;a=blobdiff_plain;f=dfbapi.c;h=dfb3ae845e9abf626b136d8882f5ea10a5702082;hp=aeb6cffe723350fd088ff01d85c1f606209d043b;hb=ac3628afff01679dfa9da69cf010764970e40be7;hpb=e28fcecc54036e7258172b96e97df4a8131f0d9a diff --git a/dfbapi.c b/dfbapi.c index aeb6cff..dfb3ae8 100644 --- a/dfbapi.c +++ b/dfbapi.c @@ -275,17 +275,17 @@ int d3_lattice_draw(d3_lattice *d3_l,int x,int y,int z,int arg_c,char **arg_v) return 1; } -int 2d_event_init(2d_lattice *2d_l) +int d2_event_init(d2_lattice *d2_l) { - 2d_l->dfb->GetInputDevice(2d_l->dfb,DIDID_KEYBOARD,&(2d_l->keyboard)); - 2d_l->keyboard->CreateEventBuffer(2d_l->keyboard,&(2d_l->k_buffer)); + d2_l->dfb->GetInputDevice(d2_l->dfb,DIDID_KEYBOARD,&(d2_l->keyboard)); + d2_l->keyboard->CreateEventBuffer(d2_l->keyboard,&(d2_l->k_buffer)); return 1; } int d3_event_init(d3_lattice *d3_l) { - d3_l->dfb->GetInputDevice(d3_l->dfb,DIDID_KEYBOARD,&(3d_l->keyboard)); + d3_l->dfb->GetInputDevice(d3_l->dfb,DIDID_KEYBOARD,&(d3_l->keyboard)); d3_l->keyboard->CreateEventBuffer(d3_l->keyboard,&(d3_l->k_buffer)); return 1; @@ -300,11 +300,11 @@ int scan_event(d3_lattice *d3_l,int *x,int *y,int *z,int *q,int *esc) { if(ke.key_id==DIKI_LEFT && *x!=0) *x-=1; if(ke.key_id==DIKI_RIGHT && *x!=d3_l->max_x-1) *x+=1; - if(ke.key_id==DIET_DOWN && *y!=0) *y-=1; - if(ke.key_id==DIET_UP && *y!=d3_l->max_y-1) *y+=1; - if(ke.key_id==DIET_PAGE_DOWN && *z!=0) *z-=1; - if(ke.key_id==DIET_PAGE_UP && *z!=d3_l->mac_z-1) *z+=1; - if(ke.key_id==DIKI_Q) *quit=1; + if(ke.key_id==DIKI_DOWN && *y!=0) *y-=1; + if(ke.key_id==DIKI_UP && *y!=d3_l->max_y-1) *y+=1; + if(ke.key_id==DIKI_PAGE_DOWN && *z!=0) *z-=1; + if(ke.key_id==DIKI_PAGE_UP && *z!=d3_l->max_z-1) *z+=1; + if(ke.key_id==DIKI_Q) *q=1; if(ke.key_id==DIKI_ESCAPE) *esc=1; }