WIN: cleanup warnings

This commit is contained in:
darkstar
2018-03-07 00:12:23 +01:00
parent 7e4706fafc
commit ebade6a543
10 changed files with 102 additions and 99 deletions

View File

@@ -8,7 +8,7 @@
*
* Platform main support module for Windows.
*
* Version: @(#)win.c 1.0.5 2018/03/07
* Version: @(#)win.c 1.0.6 2018/03/08
*
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
* Miran Grca, <mgrca8@gmail.com>
@@ -67,6 +67,9 @@
# include "win_ddraw.h"
# include "win_d3d.h"
#endif
#ifdef _MSC_VER
# include <io.h> /* for _open_osfhandle() */
#endif
#include "win.h"

View File

@@ -8,7 +8,7 @@
*
* Platform support defintions for Win32.
*
* Version: @(#)win.h 1.0.4 2018/03/07
* Version: @(#)win.h 1.0.5 2018/03/08
*
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
* Miran Grca, <mgrca8@gmail.com>
@@ -75,7 +75,7 @@ extern int status_is_open;
extern char openfilestring[260];
extern WCHAR wopenfilestring[260];
extern uint8_t filterindex;
extern DWORD filterindex;
#ifdef USE_CRASHDUMP

View File

@@ -9,7 +9,7 @@
* Implementation of the CD-ROM host drive IOCTL interface for
* Windows using SCSI Passthrough Direct.
*
* Version: @(#)cdrom_ioctl.c 1.0.3 2018/03/07
* Version: @(#)cdrom_ioctl.c 1.0.4 2018/03/08
*
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
* Miran Grca, <mgrca8@gmail.com>
@@ -359,7 +359,7 @@ static int ioctl_get_last_block(uint8_t id, unsigned char starttrack, int msf, i
unsigned long size;
int c, d = 0;
CDROM_TOC lbtoc;
int lb = 0;
uint32_t lb = 0;
if (!cdrom_drives[id].host_drive)
{
return 0;

View File

@@ -8,7 +8,7 @@
*
* Handle generation of crash-dump reports.
*
* Version: @(#)win_crashdump.c 1.0.4 2018/03/07
* Version: @(#)win_crashdump.c 1.0.5 2018/03/08
*
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
* Riley (Rai-chan),
@@ -61,7 +61,7 @@ MakeCrashDump(PEXCEPTION_POINTERS ExceptionInfo)
SYSTEMTIME SystemTime;
HANDLE hDumpFile;
char *BufPtr;
int i;
DWORD i;
/*
* Win32-specific functions will be used wherever possible,

View File

@@ -8,7 +8,7 @@
*
* Rendering module for Microsoft Direct3D 9.
*
* Version: @(#)win_d3d.cpp 1.0.4 2018/03/07
* Version: @(#)win_d3d.cpp 1.0.5 2018/03/08
*
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
* Miran Grca, <mgrca8@gmail.com>
@@ -220,8 +220,8 @@ d3d_blit_fs(int x, int y, int y1, int y2, int w, int h)
d3d_verts[0].tu = d3d_verts[2].tu = d3d_verts[3].tu = 0;
d3d_verts[0].tv = d3d_verts[3].tv = d3d_verts[4].tv = 0;
d3d_verts[1].tu = d3d_verts[4].tu = d3d_verts[5].tu = (float)w / 2048.0;
d3d_verts[1].tv = d3d_verts[2].tv = d3d_verts[5].tv = (float)h / 2048.0;
d3d_verts[1].tu = d3d_verts[4].tu = d3d_verts[5].tu = (float)w / 2048.0f;
d3d_verts[1].tv = d3d_verts[2].tv = d3d_verts[5].tv = (float)h / 2048.0f;
d3d_verts[0].color = d3d_verts[1].color = d3d_verts[2].color =
d3d_verts[3].color = d3d_verts[4].color = d3d_verts[5].color =
d3d_verts[6].color = d3d_verts[7].color = d3d_verts[8].color =
@@ -230,22 +230,22 @@ d3d_blit_fs(int x, int y, int y1, int y2, int w, int h)
GetClientRect(d3d_device_window, &w_rect);
d3d_size(w_rect, &l, &t, &r, &b, w, h);
d3d_verts[0].x = l;
d3d_verts[0].y = t;
d3d_verts[1].x = r;
d3d_verts[1].y = b;
d3d_verts[2].x = l;
d3d_verts[2].y = b;
d3d_verts[3].x = l;
d3d_verts[3].y = t;
d3d_verts[4].x = r;
d3d_verts[4].y = t;
d3d_verts[5].x = r;
d3d_verts[5].y = b;
d3d_verts[6].x = d3d_verts[8].x = d3d_verts[9].x = r - 40.5;
d3d_verts[6].y = d3d_verts[9].y = d3d_verts[10].y = t + 8.5;
d3d_verts[7].x = d3d_verts[10].x = d3d_verts[11].x = r - 8.5;
d3d_verts[7].y = d3d_verts[8].y = d3d_verts[11].y = t + 14.5;
d3d_verts[0].x = (float)l;
d3d_verts[0].y = (float)t;
d3d_verts[1].x = (float)r;
d3d_verts[1].y = (float)b;
d3d_verts[2].x = (float)l;
d3d_verts[2].y = (float)b;
d3d_verts[3].x = (float)l;
d3d_verts[3].y = (float)t;
d3d_verts[4].x = (float)r;
d3d_verts[4].y = (float)t;
d3d_verts[5].x = (float)r;
d3d_verts[5].y = (float)b;
d3d_verts[6].x = d3d_verts[8].x = d3d_verts[9].x = (float)r - 40.5f;
d3d_verts[6].y = d3d_verts[9].y = d3d_verts[10].y = (float)t + 8.5f;
d3d_verts[7].x = d3d_verts[10].x = d3d_verts[11].x = (float)r - 8.5f;
d3d_verts[7].y = d3d_verts[8].y = d3d_verts[11].y = (float)t + 14.5f;
if (hr == D3D_OK)
hr = v_buffer->Lock(0, 0, (void**)&pVoid, 0);
@@ -325,22 +325,22 @@ d3d_blit(int x, int y, int y1, int y2, int w, int h)
d3d_verts[0].tu = d3d_verts[2].tu = d3d_verts[3].tu = 0;//0.5 / 2048.0;
d3d_verts[0].tv = d3d_verts[3].tv = d3d_verts[4].tv = 0;//0.5 / 2048.0;
d3d_verts[1].tu = d3d_verts[4].tu = d3d_verts[5].tu = (float)w / 2048.0;
d3d_verts[1].tv = d3d_verts[2].tv = d3d_verts[5].tv = (float)h / 2048.0;
d3d_verts[1].tu = d3d_verts[4].tu = d3d_verts[5].tu = (float)w / 2048.0f;
d3d_verts[1].tv = d3d_verts[2].tv = d3d_verts[5].tv = (float)h / 2048.0f;
d3d_verts[0].color = d3d_verts[1].color = d3d_verts[2].color =
d3d_verts[3].color = d3d_verts[4].color = d3d_verts[5].color =
d3d_verts[6].color = d3d_verts[7].color = d3d_verts[8].color =
d3d_verts[9].color = d3d_verts[10].color = d3d_verts[11].color = 0xffffff;
GetClientRect(d3d_hwnd, &r);
d3d_verts[0].x = d3d_verts[2].x = d3d_verts[3].x = -0.5;
d3d_verts[0].y = d3d_verts[3].y = d3d_verts[4].y = -0.5;
d3d_verts[1].x = d3d_verts[4].x = d3d_verts[5].x = (r.right-r.left)-0.5;
d3d_verts[1].y = d3d_verts[2].y = d3d_verts[5].y = (r.bottom-r.top)-0.5;
d3d_verts[6].x = d3d_verts[8].x = d3d_verts[9].x = (r.right-r.left)-40.5;
d3d_verts[6].y = d3d_verts[9].y = d3d_verts[10].y = 8.5;
d3d_verts[7].x = d3d_verts[10].x = d3d_verts[11].x = (r.right-r.left)-8.5;
d3d_verts[7].y = d3d_verts[8].y = d3d_verts[11].y = 14.5;
d3d_verts[0].x = d3d_verts[2].x = d3d_verts[3].x = -0.5f;
d3d_verts[0].y = d3d_verts[3].y = d3d_verts[4].y = -0.5f;
d3d_verts[1].x = d3d_verts[4].x = d3d_verts[5].x = (r.right-r.left)-0.5f;
d3d_verts[1].y = d3d_verts[2].y = d3d_verts[5].y = (r.bottom-r.top)-0.5f;
d3d_verts[6].x = d3d_verts[8].x = d3d_verts[9].x = (r.right-r.left)-40.5f;
d3d_verts[6].y = d3d_verts[9].y = d3d_verts[10].y = 8.5f;
d3d_verts[7].x = d3d_verts[10].x = d3d_verts[11].x = (r.right-r.left)-8.5f;
d3d_verts[7].y = d3d_verts[8].y = d3d_verts[11].y = 14.5f;
if (hr == D3D_OK)
hr = v_buffer->Lock(0, 0, (void**)&pVoid, 0); // lock the vertex buffer

View File

@@ -8,7 +8,7 @@
*
* Implementation of server several dialogs.
*
* Version: @(#)win_dialog.c 1.0.3 2018/03/07
* Version: @(#)win_dialog.c 1.0.4 2018/03/08
*
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
* Miran Grca, <mgrca8@gmail.com>
@@ -56,7 +56,7 @@
WCHAR path[MAX_PATH];
WCHAR wopenfilestring[260];
char openfilestring[260];
uint8_t filterindex = 0;
DWORD filterindex = 0;
static int CALLBACK

View File

@@ -11,7 +11,7 @@
* NOTE: Hacks currently needed to compile with MSVC; DX needs to
* be updated to 11 or 12 or so. --FvK
*
* Version: @(#)win_joystick.cpp 1.0.3 2018/03/07
* Version: @(#)win_joystick.cpp 1.0.4 2018/03/08
*
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
* Miran Grca, <mgrca8@gmail.com>
@@ -227,7 +227,7 @@ static int joystick_get_axis(int joystick_nr, int mapping)
if (LOWORD(pov) == 0xFFFF)
return 0;
else
return sin((2*M_PI * (double)pov) / 36000.0) * 32767;
return (int)sin((2*M_PI * (double)pov) / 36000.0) * 32767;
}
else if (mapping & POV_Y)
{
@@ -236,7 +236,7 @@ static int joystick_get_axis(int joystick_nr, int mapping)
if (LOWORD(pov) == 0xFFFF)
return 0;
else
return -cos((2*M_PI * (double)pov) / 36000.0) * 32767;
return (int)-cos((2*M_PI * (double)pov) / 36000.0) * 32767;
}
else
return plat_joystick_state[joystick_nr].a[plat_joystick_state[joystick_nr].axis[mapping].id];

View File

@@ -8,7 +8,7 @@
*
* Implementation of the New Floppy Image dialog.
*
* Version: @(#)win_new_floppy.c 1.0.5 2018/03/07
* Version: @(#)win_new_floppy.c 1.0.6 2018/03/08
*
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
* Miran Grca, <mgrca8@gmail.com>
@@ -566,7 +566,7 @@ NewFloppyDialogProcedure(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam)
int i = 0;
int wcs_len, ext_offs;
wchar_t *ext;
uint8_t disk_size, rpm_mode;
uint32_t disk_size, rpm_mode;
int ret;
FILE *f;
int zip_types;

View File

@@ -20,7 +20,7 @@
* TODO: Compression is currently not supported, until I figure out
* how ZLIB works so I can interface with it here.
*
* Version: @(#)win_png.c 1.0.1 2018/02/14
* Version: @(#)win_png.c 1.0.2 2018/03/08
*
* Author: Fred N. van Kempen, <decwiz@yahoo.com>
*
@@ -375,7 +375,7 @@ png_write(png_t *png, uint8_t *bitmap, uint32_t pixels)
/* See how many pixels we can write for this scanline. */
n = cnt;
if ((png->lwidth - png->col) < n)
if ((uint32_t)(png->lwidth - png->col) < n)
n = (png->lwidth - png->col);
if ((DEFL_MAX_BLKSZ - png->bufcnt) < n)
n = (DEFL_MAX_BLKSZ - png->bufcnt);

View File

@@ -8,7 +8,7 @@
*
* Implementation of the Settings dialog.
*
* Version: @(#)win_settings.c 1.0.6 2018/03/07
* Version: @(#)win_settings.c 1.0.7 2018/03/08
*
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
* Miran Grca, <mgrca8@gmail.com>
@@ -220,19 +220,19 @@ settings_init(void)
memcpy(temp_hdd, hdd, HDD_NUM * sizeof(hard_disk_t));
for (i=0; i<HDD_NUM; i++) {
if (hdd[i].bus == HDD_BUS_MFM)
mfm_tracking |= (1 << (hdd[i].mfm_channel << 3));
mfm_tracking |= (1ULL << (hdd[i].mfm_channel << 3));
else if (hdd[i].bus == HDD_BUS_XTIDE)
xtide_tracking |= (1 << (hdd[i].xtide_channel << 3));
xtide_tracking |= (1ULL << (hdd[i].xtide_channel << 3));
else if (hdd[i].bus == HDD_BUS_ESDI)
esdi_tracking |= (1 << (hdd[i].esdi_channel << 3));
esdi_tracking |= (1ULL << (hdd[i].esdi_channel << 3));
else if (hdd[i].bus == HDD_BUS_IDE_PIO_ONLY)
ide_tracking |= (1 << (hdd[i].ide_channel << 3));
ide_tracking |= (1ULL << (hdd[i].ide_channel << 3));
else if (hdd[i].bus == HDD_BUS_IDE_PIO_AND_DMA)
ide_tracking |= (1 << (hdd[i].ide_channel << 3));
ide_tracking |= (1ULL << (hdd[i].ide_channel << 3));
else if (hdd[i].bus == HDD_BUS_SCSI)
scsi_tracking[hdd[i].scsi_id] |= (1 << (hdd[i].scsi_lun << 3));
scsi_tracking[hdd[i].scsi_id] |= (1ULL << (hdd[i].scsi_lun << 3));
else if (hdd[i].bus == HDD_BUS_SCSI_REMOVABLE)
scsi_tracking[hdd[i].scsi_id] |= (1 << (hdd[i].scsi_lun << 3));
scsi_tracking[hdd[i].scsi_id] |= (1ULL << (hdd[i].scsi_lun << 3));
}
/* Floppy drives category */
@@ -2099,7 +2099,7 @@ static void add_locations(HWND hdlg)
static uint8_t next_free_binary_channel(uint64_t *tracking)
{
int64_t i;
int8_t i;
for (i = 0; i < 2; i++) {
if (!(*tracking & (0xffLL << (i << 3LL))))
@@ -2111,7 +2111,7 @@ static uint8_t next_free_binary_channel(uint64_t *tracking)
static uint8_t next_free_ide_channel(void)
{
int64_t i;
int8_t i;
for (i = 0; i < 8; i++) {
if (!(ide_tracking & (0xffLL << (i << 3LL))))
@@ -2123,7 +2123,7 @@ static uint8_t next_free_ide_channel(void)
static void next_free_scsi_id_and_lun(uint8_t *id, uint8_t *lun)
{
int64_t i, j;
uint8_t i, j;
for (j = 0; j < 8; j++) {
for (i = 0; i < 16; i++) {
@@ -2274,23 +2274,23 @@ static void recalc_location_controls(HWND hdlg, int is_add_dlg, int assign_id)
static int bus_full(uint64_t *tracking, int count)
{
int full = 0;
uint64_t full = 0;
switch(count) {
case 2:
default:
full = (*tracking & 0xFF00LL);
full = full && (*tracking & 0x00FFLL);
return full;
full = (*tracking & 0xFF00ULL);
full = full && (*tracking & 0x00FFULL);
return full != 0;
case 8:
full = (*tracking & 0xFF00000000000000LL);
full = full && (*tracking & 0x00FF000000000000LL);
full = full && (*tracking & 0x0000FF0000000000LL);
full = full && (*tracking & 0x000000FF00000000LL);
full = full && (*tracking & 0x00000000FF000000LL);
full = full && (*tracking & 0x0000000000FF0000LL);
full = full && (*tracking & 0x000000000000FF00LL);
full = full && (*tracking & 0x00000000000000FFLL);
return full;
full = (*tracking & 0xFF00000000000000ULL);
full = full && (*tracking & 0x00FF000000000000ULL);
full = full && (*tracking & 0x0000FF0000000000ULL);
full = full && (*tracking & 0x000000FF00000000ULL);
full = full && (*tracking & 0x00000000FF000000ULL);
full = full && (*tracking & 0x0000000000FF0000ULL);
full = full && (*tracking & 0x000000000000FF00ULL);
full = full && (*tracking & 0x00000000000000FFULL);
return full != 0;
}
}
@@ -2685,7 +2685,7 @@ wchar_t hd_file_name[512];
static hard_disk_t *hdd_ptr;
static int hdconf_initialize_hdt_combo(HWND hdlg)
static uint64_t hdconf_initialize_hdt_combo(HWND hdlg)
{
HWND h;
int i = 0;
@@ -2709,7 +2709,7 @@ static int hdconf_initialize_hdt_combo(HWND hdlg)
}
SendMessage(h, CB_ADDSTRING, 0, (LPARAM)plat_get_string(IDS_4100));
SendMessage(h, CB_ADDSTRING, 0, (LPARAM)plat_get_string(IDS_4101));
SendMessage(h, CB_SETCURSEL, selection, 0);
SendMessage(h, CB_SETCURSEL, selection & 0xffff, 0);
return selection;
}
@@ -2731,7 +2731,7 @@ static void recalc_selection(HWND hdlg)
{
selection = 128;
}
SendMessage(h, CB_SETCURSEL, selection, 0);
SendMessage(h, CB_SETCURSEL, selection & 0xffff, 0);
}
static int chs_enabled = 0;
@@ -2744,7 +2744,7 @@ static BOOL CALLBACK
hard_disks_add_proc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam)
{
HWND h = INVALID_HANDLE_VALUE;
int64_t i = 0;
uint64_t i = 0;
uint64_t temp;
FILE *f;
uint32_t sector_size = 512;
@@ -2885,7 +2885,7 @@ hard_disks_add_proc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam)
if (!(existing & 2))
{
h = GetDlgItem(hdlg, IDC_COMBO_HD_BUS);
hdd_ptr->bus = SendMessage(h, CB_GETCURSEL, 0, 0) + 1;
hdd_ptr->bus = (SendMessage(h, CB_GETCURSEL, 0, 0) + 1) & 0xff;
}
/* Make sure no file name is allowed with removable SCSI hard disks. */
@@ -2925,27 +2925,27 @@ hard_disks_add_proc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam)
{
case HDD_BUS_MFM:
h = GetDlgItem(hdlg, IDC_COMBO_HD_CHANNEL);
hdd_ptr->mfm_channel = SendMessage(h, CB_GETCURSEL, 0, 0);
hdd_ptr->mfm_channel = SendMessage(h, CB_GETCURSEL, 0, 0) & 0xff;
break;
case HDD_BUS_ESDI:
h = GetDlgItem(hdlg, IDC_COMBO_HD_CHANNEL);
hdd_ptr->esdi_channel = SendMessage(h, CB_GETCURSEL, 0, 0);
hdd_ptr->esdi_channel = SendMessage(h, CB_GETCURSEL, 0, 0) & 0xff;
break;
case HDD_BUS_XTIDE:
h = GetDlgItem(hdlg, IDC_COMBO_HD_CHANNEL);
hdd_ptr->xtide_channel = SendMessage(h, CB_GETCURSEL, 0, 0);
hdd_ptr->xtide_channel = SendMessage(h, CB_GETCURSEL, 0, 0) & 0xff;
break;
case HDD_BUS_IDE_PIO_ONLY:
case HDD_BUS_IDE_PIO_AND_DMA:
h = GetDlgItem(hdlg, IDC_COMBO_HD_CHANNEL_IDE);
hdd_ptr->ide_channel = SendMessage(h, CB_GETCURSEL, 0, 0);
hdd_ptr->ide_channel = SendMessage(h, CB_GETCURSEL, 0, 0) & 0xff;
break;
case HDD_BUS_SCSI:
case HDD_BUS_SCSI_REMOVABLE:
h = GetDlgItem(hdlg, IDC_COMBO_HD_ID);
hdd_ptr->scsi_id = SendMessage(h, CB_GETCURSEL, 0, 0);
hdd_ptr->scsi_id = SendMessage(h, CB_GETCURSEL, 0, 0) & 0xff;
h = GetDlgItem(hdlg, IDC_COMBO_HD_LUN);
hdd_ptr->scsi_lun = SendMessage(h, CB_GETCURSEL, 0, 0);
hdd_ptr->scsi_lun = SendMessage(h, CB_GETCURSEL, 0, 0) & 0xff;
break;
}
}
@@ -3518,21 +3518,21 @@ static void hard_disk_track(uint8_t id)
{
switch(temp_hdd[id].bus) {
case HDD_BUS_MFM:
mfm_tracking |= (1 << (temp_hdd[id].mfm_channel << 3));
mfm_tracking |= (1ULL << (temp_hdd[id].mfm_channel << 3));
break;
case HDD_BUS_ESDI:
esdi_tracking |= (1 << (temp_hdd[id].esdi_channel << 3));
esdi_tracking |= (1ULL << (temp_hdd[id].esdi_channel << 3));
break;
case HDD_BUS_XTIDE:
xtide_tracking |= (1 << (temp_hdd[id].xtide_channel << 3));
xtide_tracking |= (1ULL << (temp_hdd[id].xtide_channel << 3));
break;
case HDD_BUS_IDE_PIO_ONLY:
case HDD_BUS_IDE_PIO_AND_DMA:
ide_tracking |= (1 << (temp_hdd[id].ide_channel << 3));
ide_tracking |= (1ULL << (temp_hdd[id].ide_channel << 3));
break;
case HDD_BUS_SCSI:
case HDD_BUS_SCSI_REMOVABLE:
scsi_tracking[temp_hdd[id].scsi_id] |= (1 << (temp_hdd[id].scsi_lun << 3));
scsi_tracking[temp_hdd[id].scsi_id] |= (1ULL << (temp_hdd[id].scsi_lun << 3));
break;
}
}
@@ -3684,15 +3684,15 @@ hd_bus_skip:
hard_disk_untrack(hdlv_current_sel);
if (temp_hdd[hdlv_current_sel].bus == HDD_BUS_MFM)
{
temp_hdd[hdlv_current_sel].mfm_channel = SendMessage(h, CB_GETCURSEL, 0, 0);
temp_hdd[hdlv_current_sel].mfm_channel = SendMessage(h, CB_GETCURSEL, 0, 0) & 0xff;
}
else if (temp_hdd[hdlv_current_sel].bus == HDD_BUS_ESDI)
{
temp_hdd[hdlv_current_sel].esdi_channel = SendMessage(h, CB_GETCURSEL, 0, 0);
temp_hdd[hdlv_current_sel].esdi_channel = SendMessage(h, CB_GETCURSEL, 0, 0) & 0xff;
}
else if (temp_hdd[hdlv_current_sel].bus == HDD_BUS_XTIDE)
{
temp_hdd[hdlv_current_sel].xtide_channel = SendMessage(h, CB_GETCURSEL, 0, 0);
temp_hdd[hdlv_current_sel].xtide_channel = SendMessage(h, CB_GETCURSEL, 0, 0) & 0xff;
}
hard_disk_track(hdlv_current_sel);
h = GetDlgItem(hdlg, IDC_LIST_HARD_DISKS);
@@ -3709,7 +3709,7 @@ hd_bus_skip:
ignore_change = 1;
h = GetDlgItem(hdlg, IDC_COMBO_HD_CHANNEL_IDE);
hard_disk_untrack(hdlv_current_sel);
temp_hdd[hdlv_current_sel].ide_channel = SendMessage(h, CB_GETCURSEL, 0, 0);
temp_hdd[hdlv_current_sel].ide_channel = SendMessage(h, CB_GETCURSEL, 0, 0) & 0xff;
hard_disk_track(hdlv_current_sel);
h = GetDlgItem(hdlg, IDC_LIST_HARD_DISKS);
win_settings_hard_disks_update_item(h, hdlv_current_sel, 0);
@@ -3725,7 +3725,7 @@ hd_bus_skip:
ignore_change = 1;
h = GetDlgItem(hdlg, IDC_COMBO_HD_ID);
hard_disk_untrack(hdlv_current_sel);
temp_hdd[hdlv_current_sel].scsi_id = SendMessage(h, CB_GETCURSEL, 0, 0);
temp_hdd[hdlv_current_sel].scsi_id = SendMessage(h, CB_GETCURSEL, 0, 0) & 0xff;
hard_disk_track(hdlv_current_sel);
h = GetDlgItem(hdlg, IDC_LIST_HARD_DISKS);
win_settings_hard_disks_update_item(h, hdlv_current_sel, 0);
@@ -3741,7 +3741,7 @@ hd_bus_skip:
ignore_change = 1;
h = GetDlgItem(hdlg, IDC_COMBO_HD_LUN);
hard_disk_untrack(hdlv_current_sel);
temp_hdd[hdlv_current_sel].scsi_lun = SendMessage(h, CB_GETCURSEL, 0, 0);
temp_hdd[hdlv_current_sel].scsi_lun = SendMessage(h, CB_GETCURSEL, 0, 0) & 0xff;
hard_disk_track(hdlv_current_sel);
h = GetDlgItem(hdlg, IDC_LIST_HARD_DISKS);
win_settings_hard_disks_update_item(h, hdlv_current_sel, 0);
@@ -4562,7 +4562,7 @@ static void cdrom_track(uint8_t id)
if ((temp_cdrom_drives[id].bus_type == CDROM_BUS_ATAPI_PIO_ONLY) || (temp_cdrom_drives[id].bus_type == CDROM_BUS_ATAPI_PIO_ONLY))
ide_tracking |= (2 << (temp_cdrom_drives[id].ide_channel << 3));
else if (temp_cdrom_drives[id].bus_type == CDROM_BUS_SCSI)
scsi_tracking[temp_cdrom_drives[id].scsi_device_id] |= (1 << temp_cdrom_drives[id].scsi_device_lun);
scsi_tracking[temp_cdrom_drives[id].scsi_device_id] |= (1ULL << temp_cdrom_drives[id].scsi_device_lun);
}
static void cdrom_untrack(uint8_t id)
@@ -4570,7 +4570,7 @@ static void cdrom_untrack(uint8_t id)
if ((temp_cdrom_drives[id].bus_type == CDROM_BUS_ATAPI_PIO_ONLY) || (temp_cdrom_drives[id].bus_type == CDROM_BUS_ATAPI_PIO_ONLY))
ide_tracking &= ~(2 << (temp_cdrom_drives[id].ide_channel << 3));
else if (temp_cdrom_drives[id].bus_type == CDROM_BUS_SCSI)
scsi_tracking[temp_cdrom_drives[id].scsi_device_id] &= ~(1 << temp_cdrom_drives[id].scsi_device_lun);
scsi_tracking[temp_cdrom_drives[id].scsi_device_id] &= ~(1ULL << temp_cdrom_drives[id].scsi_device_lun);
}
#if 0
@@ -4587,17 +4587,17 @@ static void cdrom_track_all(void)
static void zip_track(uint8_t id)
{
if ((temp_zip_drives[id].bus_type == ZIP_BUS_ATAPI_PIO_ONLY) || (temp_zip_drives[id].bus_type == ZIP_BUS_ATAPI_PIO_ONLY))
ide_tracking |= (1 << temp_zip_drives[id].ide_channel);
ide_tracking |= (1ULL << temp_zip_drives[id].ide_channel);
else if (temp_zip_drives[id].bus_type == ZIP_BUS_SCSI)
scsi_tracking[temp_zip_drives[id].scsi_device_id] |= (1 << temp_zip_drives[id].scsi_device_lun);
scsi_tracking[temp_zip_drives[id].scsi_device_id] |= (1ULL << temp_zip_drives[id].scsi_device_lun);
}
static void zip_untrack(uint8_t id)
{
if ((temp_zip_drives[id].bus_type == ZIP_BUS_ATAPI_PIO_ONLY) || (temp_zip_drives[id].bus_type == ZIP_BUS_ATAPI_PIO_ONLY))
ide_tracking &= ~(1 << temp_zip_drives[id].ide_channel);
ide_tracking &= ~(1ULL << temp_zip_drives[id].ide_channel);
else if (temp_zip_drives[id].bus_type == ZIP_BUS_SCSI)
scsi_tracking[temp_zip_drives[id].scsi_device_id] &= ~(1 << temp_zip_drives[id].scsi_device_lun);
scsi_tracking[temp_zip_drives[id].scsi_device_id] &= ~(1ULL << temp_zip_drives[id].scsi_device_lun);
}
#if 0
@@ -5017,7 +5017,7 @@ cdrom_bus_skip:
rd_ignore_change = 1;
h = GetDlgItem(hdlg, IDC_COMBO_CD_CHANNEL_IDE);
cdrom_untrack(cdlv_current_sel);
temp_cdrom_drives[cdlv_current_sel].ide_channel = SendMessage(h, CB_GETCURSEL, 0, 0);
temp_cdrom_drives[cdlv_current_sel].ide_channel = SendMessage(h, CB_GETCURSEL, 0, 0) & 0xff;
cdrom_track(cdlv_current_sel);
h = GetDlgItem(hdlg, IDC_LIST_CDROM_DRIVES);
win_settings_cdrom_drives_update_item(h, cdlv_current_sel);
@@ -5108,7 +5108,7 @@ zip_bus_skip:
rd_ignore_change = 1;
h = GetDlgItem(hdlg, IDC_COMBO_ZIP_CHANNEL_IDE);
zip_untrack(zdlv_current_sel);
temp_zip_drives[zdlv_current_sel].ide_channel = SendMessage(h, CB_GETCURSEL, 0, 0);
temp_zip_drives[zdlv_current_sel].ide_channel = SendMessage(h, CB_GETCURSEL, 0, 0) & 0xff;
zip_track(zdlv_current_sel);
h = GetDlgItem(hdlg, IDC_LIST_ZIP_DRIVES);
win_settings_zip_drives_update_item(h, zdlv_current_sel);