mirror of
https://github.com/afska/gba-link-connection.git
synced 2026-09-09 09:27:30 -05:00
Adding LinkWireless::_setLogger(...) and LinkWirelessMultiboot::_setLogger(...) methods
This commit is contained in:
@@ -186,10 +186,7 @@ void MultibootScene::load() {
|
||||
#endif
|
||||
|
||||
#ifdef LINK_RAW_WIRELESS_ENABLE_LOGGING
|
||||
// TODO: FIX!
|
||||
linkWirelessMultiboot->linkRawWireless.logger = [](std::string string) {
|
||||
log(string);
|
||||
};
|
||||
linkWirelessMultiboot->_setLogger([](std::string string) { log(string); });
|
||||
#endif
|
||||
|
||||
log("---");
|
||||
|
||||
@@ -754,6 +754,15 @@ class LinkWireless {
|
||||
? 0
|
||||
: sessionState.outgoingMessages.peek().packetId;
|
||||
}
|
||||
#ifdef LINK_RAW_WIRELESS_ENABLE_LOGGING
|
||||
/**
|
||||
* @brief Sets a logger function.
|
||||
* \warning This is internal API!
|
||||
*/
|
||||
void _setLogger(LinkRawWireless::Logger logger) {
|
||||
linkRawWireless.logger = logger;
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief This method is called by the VBLANK interrupt handler.
|
||||
|
||||
@@ -210,6 +210,16 @@ class LinkWirelessMultiboot {
|
||||
return success;
|
||||
}
|
||||
|
||||
#ifdef LINK_RAW_WIRELESS_ENABLE_LOGGING
|
||||
/**
|
||||
* @brief Sets a logger function.
|
||||
* \warning This is internal API!
|
||||
*/
|
||||
void _setLogger(LinkRawWireless::Logger logger) {
|
||||
linkRawWireless.logger = logger;
|
||||
}
|
||||
#endif
|
||||
|
||||
private:
|
||||
LinkRawWireless linkRawWireless;
|
||||
LinkWirelessOpenSDK linkWirelessOpenSDK;
|
||||
|
||||
Reference in New Issue
Block a user