diff --git a/examples/LinkWireless_demo/src/main.cpp b/examples/LinkWireless_demo/src/main.cpp index 865a796..73877e6 100644 --- a/examples/LinkWireless_demo/src/main.cpp +++ b/examples/LinkWireless_demo/src/main.cpp @@ -462,7 +462,7 @@ void wait(u32 verticalLines) { while (count < verticalLines) { if (REG_VCOUNT != vCount) { - count += max((int)REG_VCOUNT - (int)vCount, 0); + count++; vCount = REG_VCOUNT; } }; diff --git a/lib/LinkWireless.hpp b/lib/LinkWireless.hpp index bbf43b8..e63bfbd 100644 --- a/lib/LinkWireless.hpp +++ b/lib/LinkWireless.hpp @@ -1612,7 +1612,7 @@ class LinkWireless { bool timeout(u32 limit, u32& lines, u32& vCount) { if (REG_VCOUNT != vCount) { - lines += std::max((int)REG_VCOUNT - (int)vCount, 0); + lines += max((int)REG_VCOUNT - (int)vCount, 0); vCount = REG_VCOUNT; } @@ -1625,7 +1625,7 @@ class LinkWireless { while (count < verticalLines) { if (REG_VCOUNT != vCount) { - count += std::max((int)REG_VCOUNT - (int)vCount, 0); + count++; vCount = REG_VCOUNT; } };