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

Function set_kbr_default

src/inputdevice.cpp:1304–1332  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1302}
1303
1304static void set_kbr_default (struct uae_prefs *p, int index, int devnum, struct uae_input_device_kbr_default *trans)
1305{
1306 int i, j;
1307 struct uae_input_device *kbr;
1308 struct inputdevice_functions *id = &idev[IDTYPE_KEYBOARD];
1309 uae_u32 scancode;
1310
1311 for (j = 0; j < MAX_INPUT_DEVICES; j++) {
1312 if (devnum >= 0 && devnum != j)
1313 continue;
1314 kbr = &p->keyboard_settings[index][j];
1315 uae_s8 ena = kbr->enabled;
1316 clear_id (kbr);
1317 if (ena > 0)
1318 kbr->enabled = ena;
1319 for (i = 0; i < MAX_INPUT_DEVICE_EVENTS; i++)
1320 kbr->extra[i] = -1;
1321 if (j < id->get_num ()) {
1322 if (input_get_default_keyboard (j))
1323 kbr->enabled = 1;
1324 for (i = 0; i < id->get_widget_num (j); i++) {
1325 id->get_widget_type (j, i, 0, &scancode);
1326 kbr->extra[i] = scancode;
1327 if (j == 0 || kbr->enabled)
1328 set_kbr_default_event (kbr, trans, i);
1329 }
1330 }
1331 }
1332}
1333
1334static void inputdevice_default_kb (struct uae_prefs *p, int num)
1335{

Callers 2

inputdevice_default_kbFunction · 0.85
read_inputdevice_configFunction · 0.85

Calls 3

clear_idFunction · 0.85
set_kbr_default_eventFunction · 0.85

Tested by

no test coverage detected