#include #include #include #include #include "hidn.h" #ifdef DEBUG nio_console csl; #endif int main(int __attribute__((unused)) argc, char **argv) { assert_ndless_rev(750); ums_register(); // register map_lang unsigned azerty_suffix_len = strlen("-azerty.tns"); unsigned qwertz_suffix_len = strlen("-qwertz.tns"); unsigned prgm_path_len = strlen(argv[0]); if (prgm_path_len >= azerty_suffix_len && !strcmp(argv[0] + prgm_path_len - azerty_suffix_len, "-azerty.tns")) ukbd_register(2); else if (prgm_path_len >= qwertz_suffix_len && !strcmp(argv[0] + prgm_path_len - qwertz_suffix_len, "-qwertz.tns")) ukbd_register(1); else ukbd_register(0); nl_set_resident(); if (!nl_isstartup()) { nl_no_scr_redraw(); nio_grid_puts(0, 0, 12, 1, "USB HID drivers installed!", is_cx ? NIO_COLOR_BLACK : NIO_COLOR_WHITE, is_cx ? NIO_COLOR_WHITE : NIO_COLOR_BLACK); } return 0; }