mirror of
https://github.com/afska/gba-link-connection.git
synced 2026-09-09 01:16:53 -05:00
Preventing flickers in examples caused by slow logging
This commit is contained in:
@@ -129,8 +129,12 @@ int main() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
std::string lastLoggedText = "";
|
||||
void log(std::string text) {
|
||||
if (text == lastLoggedText)
|
||||
return;
|
||||
tte_erase_screen();
|
||||
tte_write("#{P:0,0}");
|
||||
tte_write(text.c_str());
|
||||
lastLoggedText = text;
|
||||
}
|
||||
|
||||
@@ -73,8 +73,12 @@ int main() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
std::string lastLoggedText = "";
|
||||
void log(std::string text) {
|
||||
if (text == lastLoggedText)
|
||||
return;
|
||||
tte_erase_screen();
|
||||
tte_write("#{P:0,0}");
|
||||
tte_write(text.c_str());
|
||||
lastLoggedText = text;
|
||||
}
|
||||
|
||||
@@ -315,10 +315,14 @@ void forceSync() {
|
||||
linkConnection->read(remotePlayerId);
|
||||
}
|
||||
|
||||
std::string lastLoggedText = "";
|
||||
void log(std::string text) {
|
||||
if (text == lastLoggedText)
|
||||
return;
|
||||
tte_erase_screen();
|
||||
tte_write("#{P:0,0}");
|
||||
tte_write(text.c_str());
|
||||
lastLoggedText = text;
|
||||
}
|
||||
|
||||
void waitFor(u16 key) {
|
||||
|
||||
@@ -86,10 +86,14 @@ int main() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
std::string lastLoggedText = "";
|
||||
void log(std::string text) {
|
||||
if (text == lastLoggedText)
|
||||
return;
|
||||
tte_erase_screen();
|
||||
tte_write("#{P:0,0}");
|
||||
tte_write(text.c_str());
|
||||
lastLoggedText = text;
|
||||
}
|
||||
|
||||
std::string mode(std::string name, LinkGPIO::Pin pin) {
|
||||
|
||||
@@ -69,8 +69,12 @@ int main() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
std::string lastLoggedText = "";
|
||||
void log(std::string text) {
|
||||
if (text == lastLoggedText)
|
||||
return;
|
||||
tte_erase_screen();
|
||||
tte_write("#{P:0,0}");
|
||||
tte_write(text.c_str());
|
||||
lastLoggedText = text;
|
||||
}
|
||||
|
||||
@@ -68,8 +68,12 @@ int main() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
std::string lastLoggedText = "";
|
||||
void log(std::string text) {
|
||||
if (text == lastLoggedText)
|
||||
return;
|
||||
tte_erase_screen();
|
||||
tte_write("#{P:0,0}");
|
||||
tte_write(text.c_str());
|
||||
lastLoggedText = text;
|
||||
}
|
||||
|
||||
@@ -115,10 +115,14 @@ int main() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
std::string lastLoggedText = "";
|
||||
void log(std::string text) {
|
||||
if (text == lastLoggedText)
|
||||
return;
|
||||
tte_erase_screen();
|
||||
tte_write("#{P:0,0}");
|
||||
tte_write(text.c_str());
|
||||
lastLoggedText = text;
|
||||
}
|
||||
|
||||
void wait(u32 verticalLines) {
|
||||
|
||||
@@ -107,10 +107,14 @@ int main() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
std::string lastLoggedText = "";
|
||||
void log(std::string text) {
|
||||
if (text == lastLoggedText)
|
||||
return;
|
||||
tte_erase_screen();
|
||||
tte_write("#{P:0,0}");
|
||||
tte_write(text.c_str());
|
||||
lastLoggedText = text;
|
||||
}
|
||||
|
||||
void wait(u32 verticalLines) {
|
||||
|
||||
@@ -89,8 +89,12 @@ int main() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
std::string lastLoggedText = "";
|
||||
void log(std::string text) {
|
||||
if (text == lastLoggedText)
|
||||
return;
|
||||
tte_erase_screen();
|
||||
tte_write("#{P:0,0}");
|
||||
tte_write(text.c_str());
|
||||
lastLoggedText = text;
|
||||
}
|
||||
|
||||
@@ -123,10 +123,14 @@ int main() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
std::string lastLoggedText = "";
|
||||
void log(std::string text) {
|
||||
if (text == lastLoggedText)
|
||||
return;
|
||||
tte_erase_screen();
|
||||
tte_write("#{P:0,0}");
|
||||
tte_write(text.c_str());
|
||||
lastLoggedText = text;
|
||||
}
|
||||
|
||||
void waitFor(u16 key) {
|
||||
|
||||
@@ -443,10 +443,14 @@ void messageLoop() {
|
||||
}
|
||||
}
|
||||
|
||||
std::string lastLoggedText = "";
|
||||
void log(std::string text) {
|
||||
if (text == lastLoggedText)
|
||||
return;
|
||||
tte_erase_screen();
|
||||
tte_write("#{P:0,0}");
|
||||
tte_write(text.c_str());
|
||||
lastLoggedText = text;
|
||||
}
|
||||
|
||||
void waitFor(u16 key) {
|
||||
|
||||
Reference in New Issue
Block a user