Skip to content

Commit beea8d6

Browse files
Sackzementslouken
authored andcommitted
Replaced binary integer literals with hexadecimal integer literals
1 parent 5f4416b commit beea8d6

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/joystick/hidapi/SDL_hidapi_flydigi.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -335,28 +335,28 @@ static void HIDAPI_DriverFlydigi_HandleStatePacket(SDL_Joystick *joystick, SDL_D
335335
Uint8 hat;
336336

337337
switch (data[9] & 0x0F) {
338-
case 0b0001:
338+
case 0x01u:
339339
hat = SDL_HAT_UP;
340340
break;
341-
case 0b0011:
341+
case 0x02u | 0x01u:
342342
hat = SDL_HAT_RIGHTUP;
343343
break;
344-
case 0b0010:
344+
case 0x02u:
345345
hat = SDL_HAT_RIGHT;
346346
break;
347-
case 0b0110:
347+
case 0x02u | 0x04u:
348348
hat = SDL_HAT_RIGHTDOWN;
349349
break;
350-
case 0b0100:
350+
case 0x04u:
351351
hat = SDL_HAT_DOWN;
352352
break;
353-
case 0b1100:
353+
case 0x08u | 0x04u:
354354
hat = SDL_HAT_LEFTDOWN;
355355
break;
356-
case 0b1000:
356+
case 0x08u:
357357
hat = SDL_HAT_LEFT;
358358
break;
359-
case 0b1001:
359+
case 0x08u | 0x01u:
360360
hat = SDL_HAT_LEFTUP;
361361
break;
362362
default:

0 commit comments

Comments
 (0)