Commit 325fb002 authored by Keith Packard's avatar Keith Packard
Browse files

Fix 640x480x60 mode, drop inb/outb on non-x86 machines

parent a6d519e5
......@@ -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 */
......
......@@ -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)
......
......@@ -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 */
......
......@@ -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)
......
......@@ -57,7 +57,7 @@ typedef struct _vgaValue {
typedef enum _vgaAccess {
VgaAccessMem, VgaAccessIo, VgaAccessIndMem, VgaAccessIndIo,
VgaAccessDone,
VgaAccessDone
} VgaAccess;
typedef struct _vgaMap {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment