mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-25 15:19:42 -06:00
convert sjis strings in the wxw logwindow to sjis encoding. (Thankfully wxw seems to do it's own checking to see if the source data is really sjis).
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4743 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -21,6 +21,7 @@
|
|||||||
#include <wx/textctrl.h>
|
#include <wx/textctrl.h>
|
||||||
#include <wx/listbox.h>
|
#include <wx/listbox.h>
|
||||||
#include <wx/checklst.h>
|
#include <wx/checklst.h>
|
||||||
|
#include <wx/strconv.h>
|
||||||
|
|
||||||
#include "Core.h" // for Core::GetState()
|
#include "Core.h" // for Core::GetState()
|
||||||
#include "LogWindow.h"
|
#include "LogWindow.h"
|
||||||
@ -48,6 +49,7 @@ CLogWindow::CLogWindow(CFrame *parent, wxWindowID id, const wxString &, const wx
|
|||||||
: wxPanel(parent, id, position, size, style)
|
: wxPanel(parent, id, position, size, style)
|
||||||
, Parent(parent), m_LogSection(1), m_Log(NULL), m_cmdline(NULL), m_FontChoice(NULL)
|
, Parent(parent), m_LogSection(1), m_Log(NULL), m_cmdline(NULL), m_FontChoice(NULL)
|
||||||
, m_LogAccess(true)
|
, m_LogAccess(true)
|
||||||
|
, m_SJISConv(wxFONTENCODING_SHIFT_JIS)
|
||||||
{
|
{
|
||||||
m_LogManager = LogManager::GetInstance();
|
m_LogManager = LogManager::GetInstance();
|
||||||
for (int i = 0; i < LogTypes::NUMBER_OF_LOGS; ++i)
|
for (int i = 0; i < LogTypes::NUMBER_OF_LOGS; ++i)
|
||||||
@ -522,6 +524,6 @@ void CLogWindow::Log(LogTypes::LOG_LEVELS level, const char *text)
|
|||||||
m_LogSection.Enter();
|
m_LogSection.Enter();
|
||||||
if (msgQueue.size() >= 100)
|
if (msgQueue.size() >= 100)
|
||||||
msgQueue.pop();
|
msgQueue.pop();
|
||||||
msgQueue.push(std::pair<u8, wxString>((u8)level, wxString::FromAscii(text)));
|
msgQueue.push(std::pair<u8, wxString>((u8)level, wxString(text, m_SJISConv)));
|
||||||
m_LogSection.Leave();
|
m_LogSection.Leave();
|
||||||
}
|
}
|
||||||
|
@ -86,6 +86,8 @@ private:
|
|||||||
|
|
||||||
Common::CriticalSection m_LogSection;
|
Common::CriticalSection m_LogSection;
|
||||||
|
|
||||||
|
wxCSConv m_SJISConv;
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
DECLARE_EVENT_TABLE()
|
||||||
|
|
||||||
wxTextCtrl * CreateTextCtrl(wxPanel* parent, wxWindowID id = wxID_ANY, long Style = NULL);
|
wxTextCtrl * CreateTextCtrl(wxPanel* parent, wxWindowID id = wxID_ANY, long Style = NULL);
|
||||||
|
Reference in New Issue
Block a user