| 1590 | } |
| 1591 | |
| 1592 | static const struct inputevent *readevent (const TCHAR *name, TCHAR **customp) |
| 1593 | { |
| 1594 | int i = 1; |
| 1595 | while (events[i].name) { |
| 1596 | if (!_tcscmp (events[i].confname, name)) |
| 1597 | return &events[i]; |
| 1598 | i++; |
| 1599 | } |
| 1600 | if (_tcslen (name) > 2 && name[0] == '\'') { |
| 1601 | name++; |
| 1602 | const TCHAR *end = name; |
| 1603 | bool equote = false; |
| 1604 | while (*end) { |
| 1605 | if (*end == '\"') { |
| 1606 | if (!equote) { |
| 1607 | equote = 1; |
| 1608 | } else { |
| 1609 | equote = 0; |
| 1610 | } |
| 1611 | } |
| 1612 | if (!equote && *end == '\'') { |
| 1613 | break; |
| 1614 | } |
| 1615 | end++; |
| 1616 | } |
| 1617 | if (!customp || *end == 0) |
| 1618 | return NULL; |
| 1619 | TCHAR *custom = my_strdup (name); |
| 1620 | custom[end - name] = 0; |
| 1621 | *customp = custom; |
| 1622 | } |
| 1623 | return &events[0]; |
| 1624 | } |
| 1625 | |
| 1626 | void read_inputdevice_config (struct uae_prefs *pr, const TCHAR *option, TCHAR *value) |
| 1627 | { |
no outgoing calls
no test coverage detected