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:
31
src/device.c
31
src/device.c
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user