scrcpy/app/src/util/intmap.c
Romain Vimont ec707b95f8 Use static maps to convert input events
This improves readability (hopefully).
2021-11-26 21:58:56 +01:00

14 lines
349 B
C

#include "intmap.h"
const struct sc_intmap_entry *
sc_intmap_find_entry(const struct sc_intmap_entry entries[], size_t len,
int key) {
for (size_t i = 0; i < len; ++i) {
const struct sc_intmap_entry *entry = &entries[i];
if (entry->key == key) {
return entry;
}
}
return NULL;
}