From 806c04a5753d353c61c9a9d379540873e918321e Mon Sep 17 00:00:00 2001 From: death2droid Date: Sun, 16 Aug 2009 12:11:36 +0000 Subject: [PATCH] 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 --- Source/Core/DolphinWX/Src/NetWindow.cpp | 5 ++--- .../Plugin_VideoOGL/Src/GUI/ConfigDlg.cpp | 16 ++++++++-------- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/Source/Core/DolphinWX/Src/NetWindow.cpp b/Source/Core/DolphinWX/Src/NetWindow.cpp index e1806e8f30..67ac41413f 100644 --- a/Source/Core/DolphinWX/Src/NetWindow.cpp +++ b/Source/Core/DolphinWX/Src/NetWindow.cpp @@ -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); diff --git a/Source/Plugins/Plugin_VideoOGL/Src/GUI/ConfigDlg.cpp b/Source/Plugins/Plugin_VideoOGL/Src/GUI/ConfigDlg.cpp index c1bc0d9e28..82d41be2a1 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/GUI/ConfigDlg.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/GUI/ConfigDlg.cpp @@ -41,7 +41,7 @@ BEGIN_EVENT_TABLE(GFXConfigDialogOGL,wxDialog) EVT_CHECKBOX(ID_RENDERTOMAINWINDOW, GFXConfigDialogOGL::GeneralSettingsChanged) EVT_COMBOBOX(ID_FULLSCREENCB, GFXConfigDialogOGL::GeneralSettingsChanged) EVT_COMBOBOX(ID_WINDOWRESOLUTIONCB, GFXConfigDialogOGL::GeneralSettingsChanged) - EVT_COMBOBOX(ID_WINDOWFULLSCREENRESOLUTIONCB, GFXConfigDialogOGL::GeneralSettingsChanged) + EVT_COMBOBOX(ID_WINDOWFSRESOLUTIONCB, GFXConfigDialogOGL::GeneralSettingsChanged) EVT_CHOICE(ID_MAXANISOTROPY, GFXConfigDialogOGL::GeneralSettingsChanged) EVT_CHOICE(ID_MSAAMODECB, GFXConfigDialogOGL::GeneralSettingsChanged) EVT_CHECKBOX(ID_NATIVERESOLUTION, GFXConfigDialogOGL::GeneralSettingsChanged) @@ -185,8 +185,8 @@ void GFXConfigDialogOGL::CreateGUIControls() wxStaticText *FMText = new wxStaticText(m_PageGeneral, ID_FMTEXT, wxT("Fullscreen mode:"), wxDefaultPosition, wxDefaultSize , 0 ); m_WindowResolutionCB = new wxComboBox(m_PageGeneral, ID_WINDOWRESOLUTIONCB, arrayStringFor_WindowResolutionCB[0], wxDefaultPosition, wxDefaultSize, arrayStringFor_WindowResolutionCB, wxCB_READONLY, wxDefaultValidator); m_WindowResolutionCB->SetValue(wxString::FromAscii(g_Config.iInternalRes)); - m_WindowFullScreenResolutionCB = new wxComboBox(m_PageGeneral, ID_WINDOWFULLSCREENRESOLUTIONCB, arrayStringFor_FullscreenCB[0], wxDefaultPosition, wxDefaultSize, arrayStringFor_FullscreenCB, wxCB_READONLY, wxDefaultValidator); - m_WindowFullScreenResolutionCB->SetValue(wxString::FromAscii(g_Config.iFSResolution)); + m_WindowFSResolutionCB = new wxComboBox(m_PageGeneral, ID_WINDOWFSRESOLUTIONCB, arrayStringFor_FullscreenCB[0], wxDefaultPosition, wxDefaultSize, arrayStringFor_FullscreenCB, wxCB_READONLY, wxDefaultValidator); + m_WindowFSResolutionCB->SetValue(wxString::FromAscii(g_Config.iFSResolution)); // Aspect ratio / positioning controls wxStaticText *KeepARText = new wxStaticText(m_PageGeneral, wxID_ANY, wxT("Keep aspect ratio:"), wxDefaultPosition, wxDefaultSize, 0); @@ -257,7 +257,7 @@ void GFXConfigDialogOGL::CreateGUIControls() m_WindowResolutionCB->SetToolTip( wxT("Select internal resolution for the separate rendering window for windowed mode") wxT("\n\nApplies instanty during gameplay: ")); - m_WindowFullScreenResolutionCB->SetToolTip( + m_WindowFSResolutionCB->SetToolTip( wxT("Select internal resolution for the separate rendering window for fullscreen mode") wxT("\n\nApplies instanty during gameplay: ")); m_MSAAModeCB->SetToolTip(wxT( @@ -318,7 +318,7 @@ void GFXConfigDialogOGL::CreateGUIControls() sBasic->Add(WMText, wxGBPosition(1, 1), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL | wxALL, 5); sBasic->Add(m_WindowResolutionCB, wxGBPosition(2, 1), wxGBSpan(1, 1), wxALL, 5); sBasic->Add(FMText, wxGBPosition(1, 2), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL | wxALL, 5); - sBasic->Add(m_WindowFullScreenResolutionCB, wxGBPosition(2, 2), wxGBSpan(1, 1), wxALL, 5); + sBasic->Add(m_WindowFSResolutionCB, wxGBPosition(2, 2), wxGBSpan(1, 1), wxALL, 5); sBasic->Add(KeepARText, wxGBPosition(3, 0), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL | wxALL, 5); sBasic->Add(m_KeepAR43, wxGBPosition(3, 1), wxGBSpan(1, 1), wxALL, 5); @@ -620,8 +620,8 @@ void GFXConfigDialogOGL::GeneralSettingsChanged(wxCommandEvent& event) case ID_WINDOWRESOLUTIONCB: strcpy(g_Config.iInternalRes, m_WindowResolutionCB->GetValue().mb_str() ); break; - case ID_WINDOWFULLSCREENRESOLUTIONCB: - strcpy(g_Config.iFSResolution, m_WindowFullScreenResolutionCB->GetValue().mb_str() ); + case ID_WINDOWFSRESOLUTIONCB: + strcpy(g_Config.iFSResolution, m_WindowFSResolutionCB->GetValue().mb_str() ); break; case ID_MAXANISOTROPY: g_Config.iMaxAnisotropy = m_MaxAnisotropyCB->GetSelection() + 1; @@ -763,7 +763,7 @@ void GFXConfigDialogOGL::UpdateGUI() // Disable the internal resolution option if it's set to native m_WindowResolutionCB->Enable(!(g_Config.bNativeResolution || g_Config.b2xResolution)); - m_WindowFullScreenResolutionCB->Enable(!(g_Config.bNativeResolution || g_Config.b2xResolution)); + m_WindowFSResolutionCB->Enable(!(g_Config.bNativeResolution || g_Config.b2xResolution)); }