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:56:31 +02:00
parent 34c08faf46
commit 1a9a55c35e
25 changed files with 1523 additions and 899 deletions

View File

@@ -131,6 +131,37 @@ int device_get_config_int(char *s)
return 0;
}
int device_get_config_int_ex(char *s, int default_int)
{
device_config_t *config = current_device->config;
while (config->type != -1)
{
if (!strcmp(s, config->name))
return config_get_int(current_device->name, s, default_int);
config++;
}
return default_int;
}
void device_set_config_int(char *s, int val)
{
device_config_t *config = current_device->config;
while (config->type != -1)
{
if (!strcmp(s, config->name))
{
config_set_int(current_device->name, s, val);
return;
}
config++;
}
return;
}
char *device_get_config_string(char *s)
{
device_config_t *config = current_device->config;