From: notaz Date: Sun, 20 Dec 2009 19:45:40 +0000 (+0000) Subject: bugfixes X-Git-Tag: v1.85~208 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b60b8745c02ebe6fb6584161b4ee5feae1716000;p=picodrive.git bugfixes git-svn-id: file:///home/notaz/opt/svn/PicoDrive@844 be3aeb3a-fb24-0410-a615-afba39da0efa --- diff --git a/pico/draw.c b/pico/draw.c index 712e8610..e474168c 100644 --- a/pico/draw.c +++ b/pico/draw.c @@ -1421,9 +1421,10 @@ PICO_INTERNAL void PicoFrameStart(void) if (rendstatus != rendstatus_old || lines != rendlines) { rendlines = lines; - rendstatus_old = rendstatus; + // mode_change() might reset rendstatus_old by calling SetColorFormat emu_video_mode_change((lines == 240) ? 0 : 8, lines, (Pico.video.reg[12] & 1) ? 0 : 1); + rendstatus_old = rendstatus; } if (PicoOpt & POPT_ALT_RENDERER) diff --git a/platform/linux/in_evdev.c b/platform/linux/in_evdev.c index 78660152..df403683 100644 --- a/platform/linux/in_evdev.c +++ b/platform/linux/in_evdev.c @@ -126,11 +126,17 @@ static const char * const in_evdev_keys[KEY_CNT] = { 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;