mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-29 21:24:53 +00:00
Merged find_dev() inside sfx_find_device()
svn-id: r40456
This commit is contained in:
parent
ca52388f11
commit
b9a026eb20
@ -47,23 +47,21 @@ struct _midi_device **devices[] = {
|
||||
devices_opl2,
|
||||
};
|
||||
|
||||
static struct _midi_device *find_dev(int type, char *name) {
|
||||
void *sfx_find_device(int type, char *name) {
|
||||
struct _midi_device *dev = NULL;
|
||||
int i = 0;
|
||||
|
||||
if (!type)
|
||||
return NULL;
|
||||
|
||||
if (!name)
|
||||
return devices[type][0];
|
||||
if (!name) {
|
||||
dev = devices[type][0];
|
||||
} else {
|
||||
while (devices[type][i] && !strcmp(name, devices[type][i]->name))
|
||||
++i;
|
||||
|
||||
while (devices[type][i] && !strcmp(name, devices[type][i]->name))
|
||||
++i;
|
||||
|
||||
return devices[type][i];
|
||||
}
|
||||
|
||||
void *sfx_find_device(int type, char *name) {
|
||||
struct _midi_device *dev = find_dev(type, name);
|
||||
dev = devices[type][i];
|
||||
}
|
||||
|
||||
if (dev) {
|
||||
if (dev->init(dev)) {
|
||||
|
Loading…
Reference in New Issue
Block a user