\r
if (rendstatus != rendstatus_old || lines != rendlines) {\r
rendlines = lines;\r
- rendstatus_old = rendstatus;\r
+ // mode_change() might reset rendstatus_old by calling SetColorFormat\r
emu_video_mode_change((lines == 240) ? 0 : 8,\r
lines, (Pico.video.reg[12] & 1) ? 0 : 1);\r
+ rendstatus_old = rendstatus;\r
}\r
\r
if (PicoOpt & POPT_ALT_RENDERER)\r
static void in_evdev_probe(void)
{
+ long keybits[KEY_CNT / sizeof(long) / 8];
+ long absbits[(ABS_MAX+1) / sizeof(long) / 8];
int i;
+ // the kernel might support and return less keys then we know about,
+ // so make sure the buffers are clear.
+ memset(keybits, 0, sizeof(keybits));
+ memset(absbits, 0, sizeof(absbits));
+
for (i = 0;; i++)
{
- int keybits[KEY_CNT / sizeof(int)], absbits[(ABS_MAX+1)/sizeof(int)];
int support = 0, count = 0;
in_evdev_t *dev;
int u, ret, fd;