this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Revert "another"

This reverts commit 7424aef960fd8b9789cddfa203b71bdf602ca764.

alice 3fbd6462 5536176b

+3 -17
+3 -17
src/core/io.c
··· 136 136 { 137 137 tic_core* core = (tic_core*)tic; 138 138 139 - // Define a lookup table for mask values 140 - static const u32 mask_table[] = { 141 - 0x00000001, 0x00000002, 0x00000004, 0x00000008, 142 - 0x00000010, 0x00000020, 0x00000040, 0x00000080, 143 - 0x00000100, 0x00000200, 0x00000400, 0x00000800, 144 - 0x00001000, 0x00002000, 0x00004000, 0x00008000, 145 - 0x00010000, 0x00020000, 0x00040000, 0x00080000, 146 - 0x00100000, 0x00200000, 0x00400000, 0x00800000, 147 - 0x01000000, 0x02000000, 0x04000000, 0x08000000, 148 - 0x10000000, 0x20000000, 0x40000000, 0x80000000 149 - }; 150 - 151 139 // process gamepads mapping 152 140 u8* keycodes = tic->ram->mapping.data; 153 - for(s32 i = 0; i < sizeof(tic_mapping) && i < 32; ++i) 154 - { 141 + for(s32 i = 0; i < sizeof(tic_mapping); ++i) 155 142 if(keycodes[i] && tic_api_key(tic, keycodes[i])) 156 - tic->ram->input.gamepads.data |= mask_table[i]; 157 - } 143 + tic->ram->input.gamepads.data |= 1 << i; 158 144 159 145 // process gamepad 160 146 for (s32 i = 0; i < COUNT_OF(core->state.gamepads.holds) && i < 32; i++) 161 147 { 162 - u32 mask = mask_table[i]; 148 + u32 mask = 1 << i; 163 149 u32 prevDown = core->state.gamepads.previous.data & mask; 164 150 u32 down = tic->ram->input.gamepads.data & mask; 165 151