Optimise Android rendering

This commit is contained in:
Niellun
2025-06-02 04:21:16 +03:00
parent 907247467d
commit cdc68e4191
13 changed files with 137 additions and 260 deletions
+6 -4
View File
@@ -36,16 +36,18 @@ bool Interface::drawHome(bool force, int state)
if (_textDongle.prepare(_renderer, "Connection error", colorError))
_textDongle.draw(_renderer, 0.05 * width, 0.2 * height - _textDongle.height / 2);
}
if (_textDongle.prepare(_renderer, "Insert dongle", state == PROTOCOL_STATUS_NO_DEVICE ? color1 : color1_inactive))
_textDongle.draw(_renderer, 0.05 * width, 0.2 * height - _textDongle.height / 2);
else
{
if (_textDongle.prepare(_renderer, "Insert dongle", state == PROTOCOL_STATUS_NO_DEVICE ? color1 : color1_inactive))
_textDongle.draw(_renderer, 0.05 * width, 0.2 * height - _textDongle.height / 2);
}
if (_textInit.prepare(_renderer, "Initialising", state == PROTOCOL_STATUS_LINKING ? color2 : color2_inactive))
_textInit.draw(_renderer, 0.05 * width, 0.4 * height - _textInit.height / 2);
if (_textConnect.prepare(_renderer, "Connect phone", state == PROTOCOL_STATUS_ONLINE ? color3 : color3_inactive))
_textConnect.draw(_renderer, 0.05 * width, 0.6 * height - _textConnect.height / 2);
if (_textLaunch.prepare(_renderer, "Launching", state == PROTOCOL_STATUS_CONNECTED? color4 : color4_inactive))
if (_textLaunch.prepare(_renderer, "Launching", state == PROTOCOL_STATUS_CONNECTED ? color4 : color4_inactive))
_textLaunch.draw(_renderer, 0.05 * width, 0.8 * height - _textLaunch.height / 2);
SDL_RenderPresent(_renderer);
return true;
}