MCPcopy Create free account
hub / github.com/TASEmulators/fceux / stdPortInputDecode

Function stdPortInputDecode

src/drivers/Qt/input.cpp:2259–2297  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2257}
2258
2259static int stdPortInputDecode(const char *s)
2260{
2261 int ret = SI_NONE;
2262
2263 if (s[0] == 0)
2264 {
2265 return ret;
2266 }
2267
2268 if (isdigit(s[0]))
2269 {
2270 ret = atoi(s);
2271 }
2272 else
2273 {
2274 if (strcmp(s, "SI_GAMEPAD") == 0)
2275 {
2276 ret = SI_GAMEPAD;
2277 }
2278 else if (strcmp(s, "SI_ZAPPER") == 0)
2279 {
2280 ret = SI_ZAPPER;
2281 }
2282 else if (strcmp(s, "SI_POWERPADA") == 0)
2283 {
2284 ret = SI_POWERPADA;
2285 }
2286 else if (strcmp(s, "SI_POWERPADB") == 0)
2287 {
2288 ret = SI_POWERPADB;
2289 }
2290 else if (strcmp(s, "SI_ARKANOID") == 0)
2291 {
2292 ret = SI_ARKANOID;
2293 }
2294 }
2295
2296 return ret;
2297}
2298
2299static const char *expPortInputEncode(int v)
2300{

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected