mirror of
https://github.com/afska/gba-link-connection.git
synced 2026-10-01 21:36:53 -05:00
Adding clear parameter to getResult
This commit is contained in:
@@ -515,9 +515,15 @@ class LinkCableMultiboot {
|
||||
State getState() { return state; }
|
||||
|
||||
/**
|
||||
* @brief Returns the result of the last operation.
|
||||
* @brief Returns the result of the last operation. After this
|
||||
* call, the result is cleared if `clear` is `true` (default behavior).
|
||||
* @param clear Whether it should clear the result or not.
|
||||
*/
|
||||
Result getResult() { return result; }
|
||||
Result getResult(bool clear = true) {
|
||||
Result _result = result;
|
||||
result = NONE;
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Returns the number of connected players (`1~4`).
|
||||
|
||||
Reference in New Issue
Block a user