wxConvCurrent in wxWidgets is not always initialized at startup

like it is supposed to and depending on the linking method used
this shows up as the inability to use it in an initializer.

I think this may be a wxWidgets bug (ticket #12927), but I haven't
fully debugged it yet.

For now, apply a workaround here.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7208 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Soren Jorvang 2011-02-19 22:56:51 +00:00
parent 1795da46ab
commit 69a3e5f3c3
1 changed files with 2 additions and 1 deletions

View File

@ -43,7 +43,7 @@ CLogWindow::CLogWindow(CFrame *parent, wxWindowID id, const wxPoint& pos,
, Parent(parent) , m_LogAccess(true)
, m_Log(NULL), m_cmdline(NULL), m_FontChoice(NULL)
, m_LogSection(1)
, m_SJISConv(*(wxCSConv*)wxConvCurrent)
, m_SJISConv(wxT(""))
{
#ifdef _WIN32
static bool validCP932 = ::IsValidCodePage(932) != 0;
@ -54,6 +54,7 @@ CLogWindow::CLogWindow(CFrame *parent, wxWindowID id, const wxPoint& pos,
else
{
WARN_LOG(COMMON, "Cannot Convert from Charset Windows Japanese cp 932");
m_SJISConv = *(wxCSConv*)wxConvCurrent;
}
#else
m_SJISConv = wxCSConv(wxFontMapper::GetEncodingName(wxFONTENCODING_EUC_JP));