Merge pull request #3275 from JosJuice/wiimote-message

DolphinWX: Don't translate OSD messages
This commit is contained in:
Anthony 2016-09-16 12:39:11 -05:00 committed by GitHub
commit 533ee4ccbe
3 changed files with 8 additions and 8 deletions

View File

@ -440,15 +440,15 @@ bool ReadHeader(const std::string& filename, StateHeader& header)
return true;
}
std::string GetInfoStringOfSlot(int slot)
std::string GetInfoStringOfSlot(int slot, bool translate)
{
std::string filename = MakeStateFilename(slot);
if (!File::Exists(filename))
return GetStringT("Empty");
return translate ? GetStringT("Empty") : "Empty";
State::StateHeader header;
if (!ReadHeader(filename, header))
return GetStringT("Unknown");
return translate ? GetStringT("Unknown") : "Unknown";
return Common::Timer::GetDateTimeFormatted(header.time);
}

View File

@ -33,7 +33,7 @@ bool ReadHeader(const std::string& filename, StateHeader& header);
// Returns a string containing information of the savestate in the given slot
// which can be presented to the user for identification purposes
std::string GetInfoStringOfSlot(int slot);
std::string GetInfoStringOfSlot(int slot, bool translate = true);
// These don't happen instantly - they get scheduled as events.
// ...But only if we're not in the main CPU thread.

View File

@ -30,6 +30,7 @@
#include "Common/FileSearch.h"
#include "Common/FileUtil.h"
#include "Common/NandPaths.h"
#include "Common/StringUtil.h"
#include "Core/BootManager.h"
#include "Core/ConfigManager.h"
@ -1553,9 +1554,8 @@ void CFrame::ConnectWiimote(int wm_idx, bool connect)
{
bool was_unpaused = Core::PauseAndLock(true);
GetUsbPointer()->AccessWiiMote(wm_idx | 0x100)->Activate(connect);
wxString msg(wxString::Format(_("Wiimote %i %s"), wm_idx + 1,
connect ? _("Connected") : _("Disconnected")));
Core::DisplayMessage(WxStrToStr(msg), 3000);
const char* message = connect ? "Wiimote %i connected" : "Wiimote %i disconnected";
Core::DisplayMessage(StringFromFormat(message, wm_idx + 1), 3000);
Host_UpdateMainFrame();
Core::PauseAndLock(false, was_unpaused);
}
@ -1675,7 +1675,7 @@ void CFrame::OnSelectSlot(wxCommandEvent& event)
{
m_saveSlot = event.GetId() - IDM_SELECT_SLOT_1 + 1;
Core::DisplayMessage(StringFromFormat("Selected slot %d - %s", m_saveSlot,
State::GetInfoStringOfSlot(m_saveSlot).c_str()),
State::GetInfoStringOfSlot(m_saveSlot, false).c_str()),
2500);
}