Fixed the floppy-error bug on VC builds (was uninited variable in fdd_img.c)

Made the CD=ROM ioctl support code conditional, as per OBattler's concerns over that code.
This commit is contained in:
waltje
2018-05-09 01:48:40 -04:00
parent 89b379d785
commit 6bc2044b73
13 changed files with 71 additions and 45 deletions

View File

@@ -69,7 +69,9 @@
/* Define to 1 if you have the `pthread' library (-lpthread). */
#ifndef LIBVNCSERVER_HAVE_LIBPTHREAD
#define LIBVNCSERVER_HAVE_LIBPTHREAD 1
#ifndef _WIN32
# define LIBVNCSERVER_HAVE_LIBPTHREAD 1
#endif
#endif
/* Define to 1 if you have the `socket' library (-lsocket). */

View File

@@ -8,7 +8,7 @@
#
# Makefile for Windows using Visual Studio 2015.
#
# Version: @(#)Makefile.VC 1.0.26 2018/05/06
# Version: @(#)Makefile.VC 1.0.27 2018/05/08
#
# Author: Fred N. van Kempen, <decwiz@yahoo.com>
#
@@ -165,10 +165,6 @@ ifeq ($(DEV_BUILD), y)
WONDER := y
endif
# Where is the the WinPcap SDK?
WPCAP = "C:\Program Files (x86)\WinPcap"
WPCAPINC = -I$(WPCAP)\Include
WPCAPLIB = $(WPCAP)\Lib
# WxWidgets basic info. Extract using the config program.
ifneq ($(WX), n)
@@ -206,12 +202,12 @@ endif
#########################################################################
# Nothing should need changing from here on.. #
#########################################################################
VPATH := $(EXPATH) . cpu \
VPATH := $(EXPATH) . cpu \
devices \
devices/cdrom devices/disk devices/floppy \
devices/floppy/lzf devices/input devices/input/game \
devices/network devices/network/slirp devices/ports \
devices/sio devices/system devices/scsi devices\misc \
devices/sio devices/system devices/scsi devices/misc \
devices/sound \
devices/sound/munt devices/sound/munt/c_interface \
devices/sound/munt/sha1 devices/sound/munt/srchelper \
@@ -371,23 +367,20 @@ OPTS += -DUSE_VNC
RFLAGS += -DUSE_VNC
ifneq ($(VNC_PATH), )
OPTS += -I$(VNC_PATH)\INCLUDE
VNCLIB := -L$(VNC_PATH)\LIB
LOPTS += $(VNC_PATH)\LIB
LIBS += -lvncserver
endif
VNCLIB += -lvncserver
VNCOBJ := vnc.obj vnc_keymap.obj
LIBS += $(VNCLIB) -lws2_32
endif
ifeq ($(RDP), y)
OPTS += -DUSE_RDP
RFLAGS += -DUSE_RDP
ifneq ($(RDP_PATH), )
OPTS += -I$(RDP_PATH)\INCLUDE
RDPLIB := -L$(RDP_PATH)\LIB
LOPTS += $(RDP_PATH)\LIB
LIBS += -lrdpsrvr
endif
RDPLIB += -lrdp
RDPOBJ := rdp.obj
LIBS += $(RDPLIB)
endif
ifeq ($(PNG), y)

View File

@@ -8,7 +8,7 @@
*
* Platform main support module for Windows.
*
* Version: @(#)win.c 1.0.19 2018/05/07
* Version: @(#)win.c 1.0.10 2018/05/08
*
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
* Miran Grca, <mgrca8@gmail.com>
@@ -751,7 +751,7 @@ plat_vidapi_reset(void)
/* If not defined, assume always OK. */
if (vid_apis[vid_api]->reset == NULL) return;
return(vid_apis[vid_api]->reset(vid_fullscreen));
vid_apis[vid_api]->reset(vid_fullscreen);
}

View File

@@ -8,7 +8,7 @@
*
* Handle the platform-side of CDROM drives.
*
* Version: @(#)win_cdrom.c 1.0.8 2018/05/06
* Version: @(#)win_cdrom.c 1.0.9 2018/05/08
*
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
* Miran Grca, <mgrca8@gmail.com>
@@ -127,7 +127,9 @@ cdrom_eject(uint8_t id)
void
cdrom_reload(uint8_t id)
{
#ifdef USE_CDROM_IOCTL
int new_cdrom_drive;
#endif
if ((cdrom_drives[id].host_drive == cdrom_drives[id].prev_host_drive) || (cdrom_drives[id].prev_host_drive == 0) || (cdrom_drives[id].host_drive != 0)) {
/* Switch from empty to empty. Do nothing. */
@@ -156,6 +158,7 @@ cdrom_reload(uint8_t id)
ui_sb_menu_set_item(SB_CDROM|id, IDM_CDROM_IMAGE | id, 1);
ui_sb_icon_state(SB_CDROM|id, 0);
}
#ifdef USE_CDROM_IOCTL
} else {
new_cdrom_drive = cdrom_drives[id].prev_host_drive;
ioctl_open(id, new_cdrom_drive);
@@ -167,6 +170,7 @@ cdrom_reload(uint8_t id)
cdrom_drives[id].host_drive = new_cdrom_drive;
ui_sb_menu_set_item(SB_CDROM|id, IDM_CDROM_HOST_DRIVE | id | ((cdrom_drives[id].host_drive - 'A') << 3), 1);
ui_sb_icon_state(SB_CDROM|id, 0);
#endif
}
ui_sb_menu_enable_item(SB_CDROM|id, IDM_CDROM_RELOAD | id, 0);

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.9 2018/05/06
* Version: @(#)cdrom_ioctl.c 1.0.10 2018/05/08
*
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
* Miran Grca, <mgrca8@gmail.com>
@@ -55,6 +55,9 @@
#include "../devices/cdrom/cdrom.h"
#ifdef USE_CDROM_IOCTL
#define MSFtoLBA(m,s,f) ((((m*60)+s)*75)+f)
@@ -1363,3 +1366,6 @@ static CDROM ioctl_cdrom=
ioctl_stop,
ioctl_exit
};
#endif