From 8ecfc7296335e34602ffcf3e21dbc18226c96941 Mon Sep 17 00:00:00 2001 From: LPFaint99 Date: Thu, 3 Sep 2009 07:51:18 +0000 Subject: [PATCH] change SetButtonFont to SetFont (Works the same on windows, SetButtonFont is not available on linux) fix char* to wxstring in netplay (unicode bugs) fix changegame in netplay to show the correct name for the chosen game git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4178 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/DolphinWX/Src/LogWindow.cpp | 2 +- Source/Core/DolphinWX/Src/NetFunctions.cpp | 2 +- Source/Core/DolphinWX/Src/NetSockets.cpp | 4 ++-- Source/Core/DolphinWX/Src/NetWindow.cpp | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Source/Core/DolphinWX/Src/LogWindow.cpp b/Source/Core/DolphinWX/Src/LogWindow.cpp index c4846e53be..1cb9ff9044 100644 --- a/Source/Core/DolphinWX/Src/LogWindow.cpp +++ b/Source/Core/DolphinWX/Src/LogWindow.cpp @@ -72,7 +72,7 @@ void CLogWindow::CreateGUIControls() for (int i = 0; i < MAX_LOGLEVEL; ++i) wxLevelsUse.Add(wxString::Format(wxT("%s"), wxLevels.Item(i).c_str())); m_verbosity = new wxRadioBox(this, IDM_VERBOSITY, wxT("Verbosity"), wxDefaultPosition, wxDefaultSize, wxLevelsUse, 0, wxRA_SPECIFY_ROWS, wxDefaultValidator); // Don't take up so much space - m_verbosity->SetButtonFont(wxFont(7, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL)); + m_verbosity->SetFont(wxFont(7, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL)); // Font wxChoice * m_FontChoice = new wxChoice(this, IDM_FONT, wxDefaultPosition, wxDefaultSize, * new wxArrayString(), 0, wxDefaultValidator); diff --git a/Source/Core/DolphinWX/Src/NetFunctions.cpp b/Source/Core/DolphinWX/Src/NetFunctions.cpp index b279f853c1..8c2a93ec0b 100644 --- a/Source/Core/DolphinWX/Src/NetFunctions.cpp +++ b/Source/Core/DolphinWX/Src/NetFunctions.cpp @@ -414,7 +414,7 @@ void NetPlay::ChangeSelectedGame(std::string game) m_selectedGame = game; UpdateNetWindow(false); - m_Logging->AppendText(wxString::Format( wxT(" *Game has been changed to : %s \r\n "), game.c_str())); + m_Logging->AppendText(wxString::Format( wxT(" *Game has been changed to : %s \r\n "), wxString(game.c_str(), wxConvUTF8).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 f9201b9fae..052fee6b23 100644 --- a/Source/Core/DolphinWX/Src/NetSockets.cpp +++ b/Source/Core/DolphinWX/Src/NetSockets.cpp @@ -296,8 +296,8 @@ bool ServerSide::SyncValues(unsigned char socketnb, sf::IPAddress Address) m_client[i].socket.Send(m_client[socketnb].nick.c_str(), buffer_size + 1); } } - Event->AppendText( wxString::Format(wxT("*Connection established to %s (%s:%d)\n"), - m_client[socketnb].nick.c_str(), Address.ToString().c_str(), m_client[m_numplayers].port)); + Event->AppendText( wxString::FromAscii(StringFromFormat("*Connection established to %s (%s:%d)\n", + m_client[socketnb].nick.c_str(), Address.ToString().c_str(), m_client[m_numplayers].port).c_str())); if (init_number != 0x1F) // Not Found //for (int i = 0; i < 4; i++) diff --git a/Source/Core/DolphinWX/Src/NetWindow.cpp b/Source/Core/DolphinWX/Src/NetWindow.cpp index fc831acd30..69fae9df28 100644 --- a/Source/Core/DolphinWX/Src/NetWindow.cpp +++ b/Source/Core/DolphinWX/Src/NetWindow.cpp @@ -546,8 +546,8 @@ void GameListPopup::OnButtons(wxCommandEvent& event) switch (event.GetId()) { case wxID_OK: - if (m_GameList->GetSelection()-1 != wxNOT_FOUND) - m_netParent->ChangeSelectedGame(std::string(m_GameList_str[m_GameList->GetSelection()-1].mb_str())); + if (m_GameList->GetSelection() != wxNOT_FOUND) + m_netParent->ChangeSelectedGame(std::string(m_GameList_str[m_GameList->GetSelection()].mb_str())); Destroy(); break; case wxID_CANCEL: