mirror of https://git.sr.ht/~rabbits/thuesday
Fixed issue with incoming events
This commit is contained in:
parent
99bcfc13f2
commit
65cce1e932
|
@ -109,7 +109,7 @@ apply_rule(Rule *r, char *s)
|
|||
regs[rid] = queue;
|
||||
} else
|
||||
regs[rid] = s;
|
||||
regs[rid] = s, *stack_++ = rid;
|
||||
*stack_++ = rid;
|
||||
}
|
||||
s = pcap;
|
||||
} else if(c != *s++)
|
||||
|
|
|
@ -140,7 +140,6 @@ static void
|
|||
screen_resize(Uint16 width, Uint16 height, int scale)
|
||||
{
|
||||
Uint32 *pixels = NULL;
|
||||
int dim_change = viewport.width != width || viewport.height != height;
|
||||
if(width < 0x8 || height < 0x8 || width >= 0x800 || height >= 0x800 || scale < 1 || scale >= 4)
|
||||
return;
|
||||
if(viewport.width == width && viewport.height == height && viewport.scale == scale)
|
||||
|
@ -186,7 +185,7 @@ emu_end(void)
|
|||
}
|
||||
|
||||
static void
|
||||
draw_pixel(unsigned int x, unsigned int y, Uint32 color)
|
||||
draw_pixel(int x, int y, Uint32 color)
|
||||
{
|
||||
if(x < viewport.width && y < viewport.height)
|
||||
viewport.pixels[y * viewport.width + x] = color;
|
||||
|
@ -344,10 +343,9 @@ interrupt(char *s, char **args)
|
|||
draw_line(acc, sint(args[0]), sint(args[1]), sint(args[2]), sint(args[3]));
|
||||
else if(wcmp(s, "rect"))
|
||||
draw_rect(acc, sint(args[0]), sint(args[1]), sint(args[2]), sint(args[3]));
|
||||
else if(wcmp(s, "size")){
|
||||
else if(wcmp(s, "size")) {
|
||||
screen_resize(acc, sint(args[0]), 1);
|
||||
}
|
||||
else
|
||||
} else
|
||||
printf("?? Unknown command: %s\n", s);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue