- fixed some compiler warnings

- video_x.cpp: now checks whether the X server has the XFree86DGA extension
This commit is contained in:
cebix 1999-10-05 14:59:46 +00:00
parent eaa14cdcb2
commit 05d24b1455
5 changed files with 11 additions and 9 deletions

View File

@ -142,7 +142,7 @@ extern void SysMountFirstFloppy(void);
// Set VideoMonitor according to video mode
void set_video_monitor(int width, int height, int bytes_per_row, bool native_byte_order)
{
int layout;
int layout = FLAYOUT_DIRECT;
switch (depth) {
case 1:
layout = FLAYOUT_DIRECT;
@ -470,9 +470,13 @@ bool VideoInit(bool classic)
#if ENABLE_DGA
// DGA available?
int event_base, error_base;
if (XF86DGAQueryExtension(x_display, &event_base, &error_base)) {
int dga_flags = 0;
XF86DGAQueryDirectVideo(x_display, screen, &dga_flags);
has_dga = dga_flags & XF86DGADirectPresent;
} else
has_dga = false;
#endif
// Find black and white colors

View File

@ -152,9 +152,8 @@ void EmulOp(uint16 opcode, M68kRegisters *r)
}
} else if (reg < 0x08 && is_read) {
uint32 t = TimerDateTime();
uint8 b;
uint8 b = t;
switch (reg & 3) {
case 0: b = t; break;
case 1: b = t >> 8; break;
case 2: b = t >> 16; break;
case 3: b = t >> 24; break;

View File

@ -56,7 +56,7 @@ static bool is_drive_number_free(int num)
uint32 e = ReadMacInt32(0x308 + qHead);
while (e) {
uint32 d = e - dsQLink;
if (ReadMacInt16(d + dsQDrive) == num)
if ((int)ReadMacInt16(d + dsQDrive) == num)
return false;
e = ReadMacInt32(e + qLink);
}

View File

@ -837,7 +837,6 @@ static bool patch_rom_classic(void)
// ROM patches for 32-bit clean Mac-II ROMs (version $067c)
static bool patch_rom_32(void)
{
uint32 *lp;
uint16 *wp;
uint8 *bp;
uint32 base;

View File

@ -392,7 +392,7 @@ bool InstallSlotROM(void)
// Calculate CRC
uint32 crc = 0;
for (int i=0; i<p; i++) {
for (uint32 i=0; i<p; i++) {
crc = (crc << 1) | (crc >> 31);
crc += srom[i];
}