--- a/src/video/wscons/SDL_wsconsevents.c Tue Sep 25 20:45:31 2012 -0700
+++ b/src/video/wscons/SDL_wsconsevents.c Tue Sep 25 20:51:31 2012 -0700
@@ -146,8 +146,11 @@
}
switch (private->kbdType) {
-#ifdef WSKBD_TYPE_ZAURUS
+#if defined(__NetBSD__) || !defined(WSKBD_TYPE_ZAURUS)
+ default:
+#else
case WSKBD_TYPE_ZAURUS:
+#endif
/* top row */
keymap[2] = SDLK_1;
keymap[3] = SDLK_2;
@@ -220,12 +223,13 @@
keymap[77] = SDLK_RIGHT;
keymap[80] = SDLK_DOWN;
break;
-#endif /* WSKBD_TYPE_ZAURUS */
+#if !defined(__NetBSD__) && defined(WSKBD_TYPE_ZAURUS)
default:
WSCONS_ReportError("Unable to map keys for keyboard type %u",
private->kbdType);
break;
+#endif
}
}
--- a/src/video/wscons/SDL_wsconsvideo.c Tue Sep 25 20:45:31 2012 -0700
+++ b/src/video/wscons/SDL_wsconsvideo.c Tue Sep 25 20:51:31 2012 -0700
@@ -141,7 +141,13 @@
WSCONS_CreateDevice
};
+#ifdef __NetBSD__
+#define WSCONSDEV_FORMAT "/dev/ttyE%01x"
+#endif
+
+#ifdef __OpenBSD__
#define WSCONSDEV_FORMAT "/dev/ttyC%01x"
+#endif
int WSCONS_VideoInit(_THIS, SDL_PixelFormat *vformat)
{
@@ -184,6 +190,11 @@
return -1;
}
if (private->info.depth > 8) {
+#ifdef __NetBSD__
+ private->greenMask = 0x00ff00;
+ private->blueMask = 0x0000ff;
+ private->redMask = 0xff0000;
+#else
if (wstype == WSDISPLAY_TYPE_SUN24 ||
wstype == WSDISPLAY_TYPE_SUNCG12 ||
wstype == WSDISPLAY_TYPE_SUNCG14 ||
@@ -202,6 +213,7 @@
WSCONS_ReportError("Unknown video hardware");
return -1;
}
+#endif
} else {
WSCONS_ReportError("Displays with 8 bpp or less are not supported");
return -1;