summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
Diffstat (limited to 'hw')
-rw-r--r--hw/kdrive/src/kcmap.c10
-rw-r--r--hw/kdrive/src/kdrive.c7
-rw-r--r--hw/kdrive/src/kmode.c4
-rw-r--r--hw/kdrive/src/vga.c5
-rw-r--r--hw/kdrive/src/vga.h2
5 files changed, 18 insertions, 10 deletions
diff --git a/hw/kdrive/src/kcmap.c b/hw/kdrive/src/kcmap.c
index 76d2f1f53..c20286b9d 100644
--- a/hw/kdrive/src/kcmap.c
+++ b/hw/kdrive/src/kcmap.c
@@ -21,7 +21,7 @@
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $XFree86: xc/programs/Xserver/hw/kdrive/kcmap.c,v 1.2 2000/02/23 20:29:52 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/kdrive/kcmap.c,v 1.3 2000/05/06 22:17:39 keithp Exp $ */
#include "kdrive.h"
@@ -55,12 +55,12 @@ KdSetColormap (ScreenPtr pScreen, int fb)
* true/direct as well as pseudo/static visuals
*/
- for (i = 0; i < (1 << pScreenPriv->screen->fb[i].depth); i++)
+ for (i = 0; i < (1 << pScreenPriv->screen->fb[fb].depth); i++)
pixels[i] = i;
- QueryColors (pCmap, (1 << pScreenPriv->screen->fb[i].depth), pixels, colors);
+ QueryColors (pCmap, (1 << pScreenPriv->screen->fb[fb].depth), pixels, colors);
- for (i = 0; i < (1 << pScreenPriv->screen->fb[i].depth); i++)
+ for (i = 0; i < (1 << pScreenPriv->screen->fb[fb].depth); i++)
{
defs[i].pixel = i;
defs[i].red = colors[i].red;
@@ -70,7 +70,7 @@ KdSetColormap (ScreenPtr pScreen, int fb)
}
(*pScreenPriv->card->cfuncs->putColors) (pCmap->pScreen, fb,
- (1 << pScreenPriv->screen->fb[i].depth),
+ (1 << pScreenPriv->screen->fb[fb].depth),
defs);
/* recolor hardware cursor */
diff --git a/hw/kdrive/src/kdrive.c b/hw/kdrive/src/kdrive.c
index d636260e5..434f7fd9d 100644
--- a/hw/kdrive/src/kdrive.c
+++ b/hw/kdrive/src/kdrive.c
@@ -21,7 +21,7 @@
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $XFree86: xc/programs/Xserver/hw/kdrive/kdrive.c,v 1.3 2000/02/23 20:29:53 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/kdrive/kdrive.c,v 1.4 2000/05/06 22:17:39 keithp Exp $ */
#include "kdrive.h"
#ifdef PSEUDO8
@@ -58,7 +58,7 @@ KdSetRootClip (ScreenPtr pScreen, BOOL enable)
#ifndef FB_OLD_SCREEN
WindowPtr pWin = WindowTable[pScreen->myNum];
WindowPtr pChild;
- Bool WasViewable = (Bool)(pWin->viewable);
+ Bool WasViewable;
Bool anyMarked;
RegionPtr pOldClip, bsExposed;
#ifdef DO_SAVE_UNDERS
@@ -67,6 +67,9 @@ KdSetRootClip (ScreenPtr pScreen, BOOL enable)
WindowPtr pLayerWin;
BoxRec box;
+ if (!pWin)
+ return;
+ WasViewable = (Bool)(pWin->viewable);
if (WasViewable)
{
for (pChild = pWin->firstChild; pChild; pChild = pChild->nextSib)
diff --git a/hw/kdrive/src/kmode.c b/hw/kdrive/src/kmode.c
index c8a908ead..9841e9848 100644
--- a/hw/kdrive/src/kmode.c
+++ b/hw/kdrive/src/kmode.c
@@ -56,8 +56,8 @@ const KdMonitorTiming kdMonitorTimings[] = {
1, 20, 24, KdSyncNegative, /* 72.809 */
},
{ 640, 480, 60, 25175, /* VESA */
- 8, 40, 144, KdSyncNegative, /* 31.469 */
- 2, 25, 29, KdSyncNegative, /* 59.940 */
+ 16, 48, 160, KdSyncNegative, /* 31.469 */
+ 10, 33, 45, KdSyncNegative, /* 59.940 */
},
/* 800x600 modes */
diff --git a/hw/kdrive/src/vga.c b/hw/kdrive/src/vga.c
index 6061696a6..77d6c2ac4 100644
--- a/hw/kdrive/src/vga.c
+++ b/hw/kdrive/src/vga.c
@@ -27,12 +27,17 @@
#include <stdio.h>
#ifdef linux
+#ifdef __i386__
#define extern static
#include <asm/io.h>
#undef extern
#define _VgaInb(r) inb(r)
#define _VgaOutb(v,r) outb(v,r)
+#else
+#define _VgaInb(r) 0
+#define _VgaOutb(v,r)
+#endif
#define _VgaByteAddr(a) ((VGAVOL8 *) (a))
#define _VgaBytePort(a) (a)
diff --git a/hw/kdrive/src/vga.h b/hw/kdrive/src/vga.h
index e8e81e3d3..b224deb7f 100644
--- a/hw/kdrive/src/vga.h
+++ b/hw/kdrive/src/vga.h
@@ -57,7 +57,7 @@ typedef struct _vgaValue {
typedef enum _vgaAccess {
VgaAccessMem, VgaAccessIo, VgaAccessIndMem, VgaAccessIndIo,
- VgaAccessDone,
+ VgaAccessDone
} VgaAccess;
typedef struct _vgaMap {