Device config fix, phase 1.

This commit is contained in:
OBattler
2022-04-04 18:11:39 +02:00
parent 3fe794c59b
commit 3cec306ecf
3 changed files with 25 additions and 1 deletions

View File

@@ -339,6 +339,29 @@ device_available(const device_t *d)
}
int
device_has_config(const device_t *d)
{
int c = 0;
if (d == NULL)
return 0;
if (d->config == NULL)
return 0;
config = d->config;
while (config->type != -1) {
if (config->type != CONFIG_MAC)
c++;
config++;
}
return (c > 0) ? 1 : 0;
}
int
device_poll(const device_t *d, int x, int y, int z, int b)
{