Extract processing client broadcast messages to a separate function.

This commit is contained in:
Bartosz Taudul 2023-05-07 16:11:42 +02:00
parent b072dbcdc6
commit c79154c87b
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3

View File

@ -323,14 +323,8 @@ int main( int argc, char** argv )
return 0; return 0;
} }
static void DrawContents() static void UpdateBroadcastClients()
{ {
static bool reconnect = false;
static std::string reconnectAddr;
static uint16_t reconnectPort;
static bool showFilter = false;
#ifndef __EMSCRIPTEN__
if( !view ) if( !view )
{ {
const auto time = std::chrono::duration_cast<std::chrono::milliseconds>( std::chrono::system_clock::now().time_since_epoch() ).count(); const auto time = std::chrono::duration_cast<std::chrono::milliseconds>( std::chrono::system_clock::now().time_since_epoch() ).count();
@ -473,6 +467,17 @@ static void DrawContents()
{ {
clients.clear(); clients.clear();
} }
}
static void DrawContents()
{
static bool reconnect = false;
static std::string reconnectAddr;
static uint16_t reconnectPort;
static bool showFilter = false;
#ifndef __EMSCRIPTEN__
UpdateBroadcastClients();
#endif #endif
int display_w, display_h; int display_w, display_h;