MCPcopy Create free account
hub / github.com/BlitterStudio/amiberry / getdevnum

Function getdevnum

src/inputdevice.cpp:347–362  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

345}
346
347static int getdevnum(int type, int devnum)
348{
349 int jcnt = idev[IDTYPE_JOYSTICK].get_num();
350 int mcnt = idev[IDTYPE_MOUSE].get_num();
351 int kcnt = idev[IDTYPE_KEYBOARD].get_num();
352
353 if (type == IDTYPE_JOYSTICK)
354 return devnum;
355 else if (type == IDTYPE_MOUSE)
356 return jcnt + devnum;
357 else if (type == IDTYPE_KEYBOARD)
358 return jcnt + mcnt + devnum;
359 else if (type == IDTYPE_INTERNALEVENT)
360 return jcnt + mcnt + kcnt + devnum;
361 return -1;
362}
363
364static int gettype(int devnum)
365{

Callers 3

inputdevice_testreadFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected