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

Function GetYN

src/drivers/common/cheat.cpp:90–103  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

88}
89
90static int GetYN(int def)
91{
92 char buf[32];
93 printf("(Y/N)[%s]: ",def?"Y":"N");
94 if ( fgets(buf,ARRAY_SIZE(buf),stdin) == nullptr )
95 {
96 return def;
97 }
98 if(buf[0]=='y' || buf[0]=='Y')
99 return(1);
100 if(buf[0]=='n' || buf[0]=='N')
101 return(0);
102 return(def);
103}
104
105/*
106** Begin list code.

Callers 2

AddCheatGGPARFunction · 0.85
AddCheatParamFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected