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

Function IsNewpressed

src/drivers/win/input.cpp:1060–1077  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1058static uint8 keyonce[MKK_COUNT];
1059
1060static int IsNewpressed(int a)
1061{
1062 unsigned int *keys_nr = GetKeyboard_nr();
1063 if (keys_nr[a])
1064 {
1065 if (!keyonce[a])
1066 {
1067 keyonce[a] = 1;
1068 return 1;
1069 }
1070 }
1071 else
1072 {
1073 keyonce[a] = 0;
1074 }
1075
1076 return 0;
1077}
1078
1079static int GetKeyPressed()
1080{

Callers 1

GetKeyPressedFunction · 0.85

Calls 1

GetKeyboard_nrFunction · 0.85

Tested by

no test coverage detected