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

Function inputdevice_set_device_status

src/inputdevice.cpp:9133–9147  ·  view source on GitHub ↗

set state (enabled/disabled) */

Source from the content-addressed store, hash-verified

9131
9132/* set state (enabled/disabled) */
9133void inputdevice_set_device_status (int devnum, int enabled)
9134{
9135 const struct inputdevice_functions *idf = getidf (devnum);
9136 int num = inputdevice_get_device_index (devnum);
9137 struct uae_input_device *uid = get_uid (idf, num);
9138 if (enabled) { // disable incompatible devices ("super device" vs "raw device")
9139 for (int i = 0; i < idf->get_num (); i++) {
9140 if (idf->get_flags (i) != idf->get_flags (num)) {
9141 struct uae_input_device *uid2 = get_uid (idf, i);
9142 uid2->enabled = 0;
9143 }
9144 }
9145 }
9146 uid->enabled = enabled;
9147}
9148
9149/* returns number of axis/buttons and keys from selected device */
9150int inputdevice_get_widget_num (int devnum)

Callers

nothing calls this directly

Calls 3

getidfFunction · 0.85
get_uidFunction · 0.85

Tested by

no test coverage detected