Updated the TCP Handshake to also negotiate a protocol version.

This needs the newest HIDtoVPAD Network client to work!
This commit is contained in:
Maschell 2017-04-10 15:41:06 +02:00
parent 1be4e01703
commit 8e974c3175
3 changed files with 12 additions and 13 deletions

View File

@ -48,19 +48,19 @@ Application::Application()
} }
Application::~Application(){ Application::~Application(){
log_printf("Application::~Application: Destroy music\n"); log_printf("Application::~Application(line %d): Destroy music\n",__LINE__);
delete bgMusic; delete bgMusic;
log_printf("Application::~Application: Destroy controller\n"); log_printf("Application::~Application(line %d): Destroy controller\n",__LINE__);
for(s32 i = 0; i < 5; i++) for(s32 i = 0; i < 5; i++)
delete controller[i]; delete controller[i];
//We may have to handle Asyncdelete in the Destructors. //We may have to handle Asyncdelete in the Destructors.
log_printf("Application::~Application: Destroy async deleter\n"); log_printf("Application::~Application(line %d): Destroy async deleter\n",__LINE__);
do{ do{
log_printf("Application::~Application: Triggering AsyncDeleter\n"); log_printf("Application::~Application(line %d): Triggering AsyncDeleter\n",__LINE__);
AsyncDeleter::triggerDeleteProcess(); AsyncDeleter::triggerDeleteProcess();
while(!AsyncDeleter::realListEmpty()){ while(!AsyncDeleter::realListEmpty()){
usleep(1000); usleep(1000);
@ -68,10 +68,10 @@ Application::~Application(){
}while(!AsyncDeleter::deleteListEmpty()); }while(!AsyncDeleter::deleteListEmpty());
AsyncDeleter::destroyInstance(); AsyncDeleter::destroyInstance();
log_printf("Application::~Application: Clear resources\n"); log_printf("Application::~Application(line %d): Clear resources\n",__LINE__);
Resources::Clear(); Resources::Clear();
log_printf("Application::~Application: Stop sound handler\n"); log_printf("Application::~Application(line %d): Stop sound handler\n",__LINE__);
SoundHandler::DestroyInstance(); SoundHandler::DestroyInstance();
} }
@ -132,17 +132,17 @@ void Application::fadeOut(){
} }
void Application::executeThread(void){ void Application::executeThread(void){
log_printf("Application::executeThread: Initialize video\n"); log_printf("Application::executeThread(line %d): Initialize video\n",__LINE__);
video = new CVideo(GX2_TV_SCAN_MODE_720P, GX2_DRC_SINGLE); video = new CVideo(GX2_TV_SCAN_MODE_720P, GX2_DRC_SINGLE);
log_printf("Application::executeThread: Video size %i x %i\n", video->getTvWidth(), video->getTvHeight()); log_printf("Application::executeThread(line %d): Video size %i x %i\n",__LINE__, video->getTvWidth(), video->getTvHeight());
//! setup default Font //! setup default Font
log_printf("Application::executeThread: Initialize main font system\n"); log_printf("Application::executeThread(line %d): Initialize main font system\n",__LINE__);
FreeTypeGX *fontSystem = new FreeTypeGX(Resources::GetFile("font.ttf"), Resources::GetFileSize("font.ttf"), true); FreeTypeGX *fontSystem = new FreeTypeGX(Resources::GetFile("font.ttf"), Resources::GetFileSize("font.ttf"), true);
GuiText::setPresetFont(fontSystem); GuiText::setPresetFont(fontSystem);
log_printf("Application::executeThread: Initialize main window\n"); log_printf("Application::executeThread(line %d): Initialize main window\n",__LINE__);
mainWindow = MainWindow::getInstance(video->getTvWidth(), video->getTvHeight()); mainWindow = MainWindow::getInstance(video->getTvWidth(), video->getTvHeight());
@ -150,7 +150,7 @@ void Application::executeThread(void){
bgMusic->Play(); bgMusic->Play();
bgMusic->SetVolume(50); bgMusic->SetVolume(50);
log_printf("Application::executeThread: Entering main loop\n"); log_printf("Application::executeThread(line %d): Entering main loop\n",__LINE__);
//! main GX2 loop (60 Hz cycle with max priority on core 1) //! main GX2 loop (60 Hz cycle with max priority on core 1)
while(!exitApplication) while(!exitApplication)

@ -1 +1 @@
Subproject commit 73bf9bfb74b74967fe017dedde2041e31397d75a Subproject commit 74d422a87e151d82e5b9ba3e403659e7aa1f7b05

View File

@ -99,7 +99,6 @@ void MainWindowContent::OnCloseEffectFinish(GuiElement *element){
} }
MainWindowContent::~MainWindowContent(){ MainWindowContent::~MainWindowContent(){
log_printf("~MainWindowContent()\n");
remove(&footerFrame); remove(&footerFrame);
remove(&bgImageColor); remove(&bgImageColor);
RemoveScreen(); RemoveScreen();