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

Function expPortInputDecode

src/drivers/Qt/input.cpp:2343–2401  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2341}
2342
2343static int expPortInputDecode(const char *s)
2344{
2345 int ret = SIFC_NONE;
2346
2347 if (s[0] == 0)
2348 {
2349 return ret;
2350 }
2351
2352 if (isdigit(s[0]))
2353 {
2354 ret = atoi(s);
2355 }
2356 else
2357 {
2358 if (strcmp(s, "SIFC_ARKANOID") == 0)
2359 {
2360 ret = SIFC_ARKANOID;
2361 }
2362 else if (strcmp(s, "SIFC_SHADOW") == 0)
2363 {
2364 ret = SIFC_SHADOW;
2365 }
2366 else if (strcmp(s, "SIFC_HYPERSHOT") == 0)
2367 {
2368 ret = SIFC_HYPERSHOT;
2369 }
2370 else if (strcmp(s, "SIFC_FKB") == 0)
2371 {
2372 ret = SIFC_FKB;
2373 }
2374 else if (strcmp(s, "SIFC_MAHJONG") == 0)
2375 {
2376 ret = SIFC_MAHJONG;
2377 }
2378 else if (strcmp(s, "SIFC_QUIZKING") == 0)
2379 {
2380 ret = SIFC_QUIZKING;
2381 }
2382 else if (strcmp(s, "SIFC_FTRAINERA") == 0)
2383 {
2384 ret = SIFC_FTRAINERA;
2385 }
2386 else if (strcmp(s, "SIFC_FTRAINERB") == 0)
2387 {
2388 ret = SIFC_FTRAINERB;
2389 }
2390 else if (strcmp(s, "SIFC_OEKAKIDS") == 0)
2391 {
2392 ret = SIFC_OEKAKIDS;
2393 }
2394 else if (strcmp(s, "SIFC_TOPRIDER") == 0)
2395 {
2396 ret = SIFC_TOPRIDER;
2397 }
2398 }
2399
2400 return ret;

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected