Skip to content

Commit c821d5f

Browse files
committed
fix max() compat with some compilers
1 parent f6c71c7 commit c821d5f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=GameControllersSTM32
2-
version=0.0.6
2+
version=0.0.7
33
author=Alexander Pruss
44
maintainer=arpruss <[email protected]>
55
sentence=Support Nunchuck, GameCube controller and Game Port joysticks on STM32F1

src/SegaController.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ SegaController::SegaController(unsigned db9_pin_7, unsigned db9_pin_1, unsigned
5656

5757
word SegaController::getState()
5858
{
59-
if (max(millis() - _lastReadTime, 0) < SC_READ_DELAY_MS)
59+
if (millis()-_lastReadTime < SC_READ_DELAY_MS)
6060
{
6161
// Not enough time has elapsed, return previously read state
6262
return _currentState;

0 commit comments

Comments
 (0)