summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authordaco65 <daco65@gmail.com>2009-08-15 14:34:52 +0000
committerdaco65 <daco65@gmail.com>2009-08-15 14:34:52 +0000
commit3311434d41021884dac616f5428aa528c9ec7979 (patch)
tree903978e04cedb6b9decc33f9632a49f89c110119 /Source/Core
parentd29088773b629dd433d550bba525959ff9218f11 (diff)
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
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/Common/Src/Log.h1
-rw-r--r--Source/Core/Common/Src/LogManager.cpp1
-rw-r--r--Source/Core/DolphinWX/Src/NetFunctions.cpp1
-rw-r--r--Source/Core/DolphinWX/Src/NetSockets.cpp8
-rw-r--r--Source/Core/DolphinWX/Src/NetWindow.cpp9
5 files changed, 16 insertions, 4 deletions
diff --git a/Source/Core/Common/Src/Log.h b/Source/Core/Common/Src/Log.h
index ca2ff1ce75..a24f7e65f0 100644
--- a/Source/Core/Common/Src/Log.h
+++ b/Source/Core/Common/Src/Log.h
@@ -69,6 +69,7 @@ enum LOG_TYPE {
WII_IPC_STM,
WII_IPC_WIIMOTE,
WIIMOTE,
+ NETPLAY,
NUMBER_OF_LOGS // Must be last
};
diff --git a/Source/Core/Common/Src/LogManager.cpp b/Source/Core/Common/Src/LogManager.cpp
index 6fb94f975f..d51f4d18ac 100644
--- a/Source/Core/Common/Src/LogManager.cpp
+++ b/Source/Core/Common/Src/LogManager.cpp
@@ -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();
diff --git a/Source/Core/DolphinWX/Src/NetFunctions.cpp b/Source/Core/DolphinWX/Src/NetFunctions.cpp
index 7570d7bd1e..4c30cce255 100644
--- a/Source/Core/DolphinWX/Src/NetFunctions.cpp
+++ b/Source/Core/DolphinWX/Src/NetFunctions.cpp
@@ -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());
}
}
diff --git a/Source/Core/DolphinWX/Src/NetSockets.cpp b/Source/Core/DolphinWX/Src/NetSockets.cpp
index a4523bf562..46689ff593 100644
--- a/Source/Core/DolphinWX/Src/NetSockets.cpp
+++ b/Source/Core/DolphinWX/Src/NetSockets.cpp
@@ -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);
+
+ }
}
}
diff --git a/Source/Core/DolphinWX/Src/NetWindow.cpp b/Source/Core/DolphinWX/Src/NetWindow.cpp
index 99802c8c82..0ea88e6120 100644
--- a/Source/Core/DolphinWX/Src/NetWindow.cpp
+++ b/Source/Core/DolphinWX/Src/NetWindow.cpp
@@ -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;