util: Always return result if not a single press req

This also fixes issues with 0 time out.
This commit is contained in:
CTCaer 2019-12-10 13:49:28 +02:00
parent e4f7928513
commit ae283aef59

View file

@ -81,5 +81,8 @@ u8 btn_wait_timeout(u32 time_ms, u8 mask)
};
// Timed out.
return 0;
if (!single_button)
return (res & mask);
else
return 0; // Return no button press if single button requested.
}