OPENGL: Small clean up.

NETPLAY: Fix the chat clearing when you press send.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4004 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
death2droid
2009-08-16 12:11:36 +00:00
parent 193a36b918
commit 806c04a575
2 changed files with 10 additions and 11 deletions

View File

@ -460,7 +460,8 @@ void NetPlay::OnGUIEvent(wxCommandEvent& event)
// TODO : there seems to be a random bug here that i can't reproduce... looked like a loop bug :/
wxString chat_str = wxString::Format(wxT("> %s : %s\n"), wxString(m_nick.c_str(), wxConvUTF8).c_str() , m_Chat->GetValue().c_str() );
int chat_size = (int)chat_str.size();
m_Chat->Clear();
// If there's no distant connection, we write but we don't send
if (m_numClients == 0) {
m_Logging->AppendText(chat_str);
@ -490,8 +491,6 @@ void NetPlay::OnGUIEvent(wxCommandEvent& event)
m_sock_client->Write(chat_str.mb_str(), chat_size + 1);
}
m_Chat->Clear();
// Do not wait for the server, just write as soon as sent
m_Logging->AppendText(chat_str);