More warning and compile fixes.

This commit is contained in:
OBattler
2023-08-08 15:38:40 +02:00
parent 87651a2cb3
commit ce5e21f870
13 changed files with 28 additions and 23 deletions

View File

@@ -113,7 +113,7 @@ typedef struct tgui_t {
struct
{
int16_t src_x, src_y;
int32_t src_x, src_y;
int16_t src_x_clip, src_y_clip;
int16_t dst_x, dst_y;
int16_t dst_y_clip, dst_x_clip;
@@ -129,7 +129,8 @@ typedef struct tgui_t {
int offset;
uint16_t ger22;
int16_t err, top, left, bottom, right;
int32_t err;
int16_t top, left, bottom, right;
int x, y, dx, dy;
uint32_t src, dst, src_old, dst_old;
int pat_x, pat_y;

View File

@@ -3078,7 +3078,6 @@ xga_init(const device_t *info)
svga_t *svga = svga_get_pri();
xga_t *xga = &svga->xga;
FILE *f;
uint32_t temp;
uint8_t *rom = NULL;
xga->ext_mem_addr = device_get_config_hex16("ext_mem_addr");
@@ -3100,13 +3099,11 @@ xga_init(const device_t *info)
f = rom_fopen(xga->type ? XGA2_BIOS_PATH : XGA_BIOS_PATH, "rb");
(void) fseek(f, 0L, SEEK_END);
temp = ftell(f);
(void) fseek(f, 0L, SEEK_SET);
rom = malloc(xga->bios_rom.sz);
memset(rom, 0xff, xga->bios_rom.sz);
(void) fread(rom, xga->bios_rom.sz, 1, f);
temp -= xga->bios_rom.sz;
(void) fclose(f);
xga->bios_rom.rom = rom;