Merge pull request #1 from joshaxey/patch-1

Resolves keyword conflict, undefined behaviour for some compilers
master
xyzz 7 years ago committed by GitHub
commit 6e00904f1c

@ -31,10 +31,10 @@ int get_key(void) {
while (1) {
memset(&pad, 0, sizeof(pad));
sceCtrlPeekBufferPositive(0, &pad, 1);
unsigned new = prev ^ (pad.buttons & prev);
unsigned newb = prev ^ (pad.buttons & prev);
prev = pad.buttons;
for (int i = 0; i < sizeof(buttons)/sizeof(*buttons); ++i)
if (new & buttons[i])
if (newb & buttons[i])
return buttons[i];
sceKernelDelayThread(1000); // 1ms

Loading…
Cancel
Save