From 8e87445c4423a03cf53ef4c2daeea44db5e8280a Mon Sep 17 00:00:00 2001 From: Rodrigo Alfonso Date: Mon, 19 Aug 2024 02:40:40 -0300 Subject: [PATCH] Disabling mGBA logs and refactoring --- README.md | 2 +- examples/LinkMobile_demo/src/main.cpp | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 6234032..59c8d11 100644 --- a/README.md +++ b/README.md @@ -409,7 +409,7 @@ The GBA operates using `1` stop bit, but everything else can be configured. By d This is a driver for an accessory that enables online conectivity on the GB and GBA. The protocol was reverse-engineered by the *REON Team*. -The original accessory was sold in Japan only and doesn't work anymore since it relies on old tech, but REON has created an open-source implementation called [libmobile](https://github.com/REONTeam/libmobile), as well as support for emulators and microcontrollers. +The original accessory was sold in Japan only and doesn't work anymore since it relies on old tech and servers, but REON has created an open-source implementation called [libmobile](https://github.com/REONTeam/libmobile), as well as support for emulators and microcontrollers. It has two modes of operation: - Direct call (P2P): Calling someone directly for a 2-player session, using the other person's IP address or the phone number provided by the [relay server](https://github.com/REONTeam/mobile-relay). diff --git a/examples/LinkMobile_demo/src/main.cpp b/examples/LinkMobile_demo/src/main.cpp index 8c2c1a4..5b0f3da 100644 --- a/examples/LinkMobile_demo/src/main.cpp +++ b/examples/LinkMobile_demo/src/main.cpp @@ -1,4 +1,4 @@ -#define LINK_ENABLE_DEBUG_LOGS 1 +#define LINK_ENABLE_DEBUG_LOGS 0 // (0) Include the header #include "../../../lib/LinkMobile.hpp" @@ -13,6 +13,10 @@ constexpr static int TRANSFER_FREQUENCY = 30; bool isConnected = false; +bool hasError = false; +u16 keys = 0; +std::string output = ""; + LinkMobile::DataTransfer dataTransfer; LinkMobile::DataTransfer lastCompletedTransfer; LinkMobile::DNSQuery dnsQuery; @@ -20,9 +24,6 @@ bool waitingDNS = false; std::string outgoingData = ""; u32 counter = 0; u32 frameCounter = 0; -std::string output = ""; -bool hasError = false; -u16 keys = 0; bool left = false, right = false, up = false, down = false; bool a = false, b = false, l = false, r = false;