summaryrefslogtreecommitdiff
path: root/chinese/zhcon/files/patch-src::display::fbdev.cpp
diff options
context:
space:
mode:
authorClive Lin <clive@FreeBSD.org>2002-03-06 03:29:13 +0000
committerClive Lin <clive@FreeBSD.org>2002-03-06 03:29:13 +0000
commitff17900312d5ff99e9811d36684ac0bd5ab4369f (patch)
tree54b5edddd8f9bd14480969f219174585cea5d567 /chinese/zhcon/files/patch-src::display::fbdev.cpp
parentUpdate mastersites (diff)
o Update zhcon to version 0.2.
o Add zh_TW.Big5 po messages. o Remove big5 IME extra-patches and merge it into standard FreeBSD patches. PR: ports/35271 Submitted by: Yen-Ming Lee <leeym@leeym.com>
Notes
Notes: svn path=/head/; revision=55612
Diffstat (limited to 'chinese/zhcon/files/patch-src::display::fbdev.cpp')
-rw-r--r--chinese/zhcon/files/patch-src::display::fbdev.cpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/chinese/zhcon/files/patch-src::display::fbdev.cpp b/chinese/zhcon/files/patch-src::display::fbdev.cpp
new file mode 100644
index 000000000000..af259e4a71ab
--- /dev/null
+++ b/chinese/zhcon/files/patch-src::display::fbdev.cpp
@@ -0,0 +1,29 @@
+--- src/display/fbdev.cpp.orig Fri Feb 15 20:15:58 2002
++++ src/display/fbdev.cpp Sun Feb 24 14:25:35 2002
+@@ -202,7 +202,11 @@
+ }
+
+ // printf ("len %d\n", mpBufLen);
++#if (__FreeBSD__ <= 3)
+ if ((mFd = open("/dev/vga", O_RDWR | O_NDELAY)) < 0) {
++#else
++ if ((mFd = open("/dev/mem", O_RDWR | O_NDELAY)) < 0) {
++#endif
+ throw(runtime_error("Can not open vga device.\n"));
+ }
+
+@@ -229,8 +233,13 @@
+ throw(runtime_error("color depth unsupported in this version\n"
+ "use 8bpp instead!"));
+ }
++#if (__FreeBSD__ <= 3)
++#define GRAPH_BASE 0x0
++#else
++#define GRAPH_BASE 0xA0000
++#endif
+ mpBuf = static_cast<char *>(mmap(0, mpBufLen, PROT_READ | PROT_WRITE,
+- MAP_SHARED, mFd, 0));
++ MAP_FILE|MAP_SHARED|MAP_FIXED, mFd, GRAPH_BASE));
+
+ if (mpBuf == MAP_FAILED)
+ throw(runtime_error("mmap() failed!"));