NETPLAY : display game name correctly in gui , added netplay to logmanager (netplay is horribly in seeing what its doing). hoping to get netplay to work again cause its borked

LLE: warning fix (would linux hate {} ? )

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3987 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
daco65 2009-08-15 14:34:52 +00:00
parent d29088773b
commit 3311434d41
6 changed files with 18 additions and 6 deletions

View File

@ -69,6 +69,7 @@ enum LOG_TYPE {
WII_IPC_STM,
WII_IPC_WIIMOTE,
WIIMOTE,
NETPLAY,
NUMBER_OF_LOGS // Must be last
};

View File

@ -72,6 +72,7 @@ LogManager::LogManager()\
m_Log[LogTypes::WII_IPC_WIIMOTE] = new LogContainer("WII_IPC_WIIMOTE","WII IPC WIIMOTE");
m_Log[LogTypes::ACTIONREPLAY] = new LogContainer("ActionReplay", "ActionReplay");
m_Log[LogTypes::MEMCARD_MANAGER] = new LogContainer("MemCard Manger", "MemCard Manger");
m_Log[LogTypes::NETPLAY] = new LogContainer("NETPLAY" , "Netplay");
m_fileLog = new FileLogListener(MAIN_LOG_FILE);
m_consoleLog = new ConsoleListener();

View File

@ -415,6 +415,7 @@ void NetPlay::ChangeSelectedGame(std::string game)
m_selectedGame = game;
UpdateNetWindow(false);
m_Logging->AppendText(wxString::Format(wxT("*Game has been changed to : %s\n"), game.c_str()));
NOTICE_LOG(NETPLAY,"Game has been changed to : %s \n",game.c_str());
}
}

View File

@ -405,7 +405,7 @@ void *ClientSide::Entry()
unsigned char value;
size_t val_sz;
m_socket.Receive((char *)&value, 1, val_sz);
// TODO : fix it. for some odd reason value is 1 instead of 16 making the connection "not successfull"
if (value == 0x16) // UDP connection successful
{
Event->AppendText(_("Connection successful !\n"));
@ -414,7 +414,7 @@ void *ClientSide::Entry()
}
else
{
Event->AppendText(_("UDP Connection FAILED !\nERROR : Unable to establish UDP Connection, please Check UDP Port forwarding !"));
Event->AppendText(_("UDP Connection FAILED !\nERROR : Unable to establish UDP Connection, please Check UDP Port forwarding !\n"));
m_socket.Close();
Event->SendEvent(HOST_ERROR);
return NULL;
@ -553,7 +553,11 @@ void ClientSide::CheckGameFound()
m_socket.Send((const char *)&send_value, 1);
for (int i = 0; i < 2; i++)
{
Event->AppendText(_("WARNING : You do not have the Selected Game !\n"));
NOTICE_LOG(NETPLAY,"Game '%s' not found!",m_selectedgame);
}
}
}

View File

@ -127,7 +127,9 @@ void NetPlay::OnHost(wxCommandEvent& WXUNUSED(event))
m_nick = m_nick.substr(0 , 255);
m_NetModel = m_NetMode->GetSelection();
//Note By DacoTaco : selection starts with 0 instead of 1 ? ( the +1 is needed)
m_selectedGame = std::string(m_GameList_str[m_GameList->GetSelection()].mb_str());
NOTICE_LOG(NETPLAY,"Game has been set to : %s \n",m_selectedGame.c_str());
// Create the listening socket
sf::SocketTCP sock_server;
@ -358,7 +360,10 @@ void NetPlay::UpdateNetWindow(bool update_infos, wxString infos)
else
{
m_critical.Enter();
m_Game_str->SetLabel(wxString::Format(wxT(" Game : %s"), m_selectedGame.c_str()));
//m_Game_str->SetLabel(wxString::Format(wxT(" Game : %s"), m_selectedGame.c_str()));
//Note By Daco : i'd hate to make another variable... (they take up space :( )
std::string temp = " Game : " + m_selectedGame;
m_Game_str->SetLabel(wxString::FromAscii( temp.c_str() ));
m_critical.Leave();
}
}
@ -544,7 +549,7 @@ void GameListPopup::OnButtons(wxCommandEvent& event)
switch (event.GetId())
{
case wxID_OK:
if (m_GameList->GetSelection() != wxNOT_FOUND)
if (m_GameList->GetSelection()-1 != wxNOT_FOUND)
m_netParent->ChangeSelectedGame(std::string(m_GameList_str[m_GameList->GetSelection()].mb_str()));
Destroy();
break;

View File

@ -87,7 +87,7 @@ void DSPDebugInterface::setBreakpoint(unsigned int address)
int real_addr = DSPSymbols::Line2Addr(address);
if (real_addr >= 0) {
if (dsp_breakpoints.Add(real_addr))
;
{}
}
}
@ -96,7 +96,7 @@ void DSPDebugInterface::clearBreakpoint(unsigned int address)
int real_addr = DSPSymbols::Line2Addr(address);
if (real_addr >= 0) {
if (dsp_breakpoints.Remove(real_addr))
;
{}
}
}