Split off the Network configuration from Other peripherals in the Settings dialog and made PCap device configurable;

Overhauled the configuration files so that the global variables are now subdivided into sections;
Fixed CD-ROM MODE SENSE page 0x2A which was being incorrectly reported as not implemented, fixes among other things Rayman 1 and Spellcross: The Last Battle (both now see the CD-ROM and play CD Audio fine).
This commit is contained in:
OBattler
2017-05-17 21:57:12 +02:00
parent dbbc22c4bb
commit 1b83ee8fd3

View File

@@ -29,7 +29,31 @@ static queueADT slirpq; /* SLiRP library handle */
static thread_t *poll_tid;
static NETRXCB poll_rx; /* network RX function to call */
static void *poll_arg; /* network RX function arg */
static int fizz;
#ifdef WALTJE
int slirp_do_log = 1;
# define ENABLE_SLIRP_LOG
#else
int slirp_do_log = 0;
#endif
static void
slirp_log(const char *format, ...)
{
#ifdef ENABLE_SLIRP_LOG
va_list ap;
if (slirp_do_log) {
va_start(ap, format);
vprintf(format, ap);
va_end(ap);
fflush(stdout);
}
#endif
}
#define pclog slirp_log
/* Instead of calling this and crashing some times
@@ -77,10 +101,7 @@ poll_thread(void *arg)
pclog("SLiRP: poll event is %08lx\n", evt);
while (slirpq != NULL) {
if (++fizz > 1200) {
fizz = 0;
slirp_tic();
}
slirp_tic();
/* Wait for the next packet to arrive. */
if (QueuePeek(slirpq) == 0) {
@@ -124,8 +145,6 @@ network_slirp_setup(uint8_t *mac, NETRXCB func, void *arg)
slirpq = QueueCreate();
pclog(" Packet queue is at %08lx\n", &slirpq);
fizz = 0;
/* Save the callback info. */
poll_rx = func;
poll_arg = arg;