- Timestamp:
- 09/09/2017 04:25:26 PM (7 years ago)
- Branches:
- master
- Children:
- 67fecc3
- Parents:
- 81d7cdc
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
emu/kbd.c
r81d7cdc r18cbd53 104 104 } 105 105 106 static void slid(int32_t sig, bool on, int32_t val) 107 { 108 out((uint8_t)(0x80 | sig)); 109 out(on ? 0x01 : 0x00); 110 out((uint8_t)val); 111 } 112 106 113 #if defined NOT_YET 107 static void pot _128(int32_t sig, int32_t val)114 static void pot(int32_t sig, int32_t val) 108 115 { 109 116 out((uint8_t)(0x80 | sig)); 110 117 out((uint8_t)val); 111 }112 113 static void pot_256(int32_t sig, int32_t val)114 {115 out((uint8_t)(0x80 | sig));116 out((uint8_t)((val >> 7) & 0x01));117 out((uint8_t)(val & 0x7f));118 118 } 119 119 #endif … … 186 186 but_off(39 + i); 187 187 } 188 189 return; 190 } 191 192 if (ev->keysym.sym >= SDLK_a && ev->keysym.sym <= SDLK_n) { 193 static int32_t lev[14] = { 194 64, 0, 0, 0, 0, 64, 64, 64, 64, 0, 0, 0, 64, 0 195 }; 196 197 int32_t i = ev->keysym.sym - SDLK_a; 198 int32_t val = lev[i]; 199 200 if (!dn) { 201 if ((ev->keysym.mod & KMOD_SHIFT) != 0) { 202 val = val > 10 ? val - 10 : 0; 203 } 204 else { 205 val = val < 117 ? val + 10 : 127; 206 } 207 } 208 209 ver2("kbd sli %d %s %d", i, dn ? "dn" : "up", val); 210 slid(25 + i, dn, val); 211 212 lev[i] = val; 213 return; 188 214 } 189 215 }
Note:
See TracChangeset
for help on using the changeset viewer.