mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 13:20:27 -06:00
Make sure that configuration dialog titles for the plugins are translated and a few other missed strings.
Initialize locale in each of the plugins on windows so that the plugin configuration dialogs are translated and the translators will get off my back. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6847 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -1234,7 +1234,7 @@ void CConfigMain::FillChoiceBox(wxChoice* _pChoice, int _PluginType, const std::
|
||||
if (rPluginInfo.Type == _PluginType)
|
||||
{
|
||||
wxString temp;
|
||||
temp = wxString::FromAscii(rInfos[i].GetPluginInfo().Name);
|
||||
temp = wxGetTranslation(wxString::From8BitData(rInfos[i].GetPluginInfo().Name));
|
||||
int NewIndex = _pChoice->Append(temp, (void*)&rInfos[i]);
|
||||
|
||||
if (rInfos[i].GetFilename() == _SelectFilename)
|
||||
|
@ -687,7 +687,7 @@ ControlGroupBox::~ControlGroupBox()
|
||||
}
|
||||
|
||||
ControlGroupBox::ControlGroupBox(ControllerEmu::ControlGroup* const group, wxWindow* const parent, wxWindow* const eventsink)
|
||||
: wxStaticBoxSizer(wxVERTICAL, parent, wxString::FromAscii(group->name))
|
||||
: wxStaticBoxSizer(wxVERTICAL, parent, WXTSTR_FROM_CSTR(group->name))
|
||||
, control_group(group)
|
||||
{
|
||||
|
||||
@ -815,7 +815,7 @@ ControlGroupBox::ControlGroupBox(ControllerEmu::ControlGroup* const group, wxWin
|
||||
_connect_macro_(setting->wxcontrol, GamepadPage::AdjustSetting, wxEVT_COMMAND_SPINCTRL_UPDATED, eventsink);
|
||||
options.push_back(setting);
|
||||
wxBoxSizer* const szr = new wxBoxSizer(wxHORIZONTAL);
|
||||
szr->Add(new wxStaticText(parent, -1, wxString::FromAscii((*i)->name)), 0, wxCENTER|wxRIGHT, 3);
|
||||
szr->Add(new wxStaticText(parent, -1, WXTSTR_FROM_CSTR((*i)->name)), 0, wxCENTER|wxRIGHT, 3);
|
||||
szr->Add(setting->wxcontrol, 0, wxRIGHT, 3);
|
||||
Add(szr, 0, wxALL|wxCENTER, 3);
|
||||
}
|
||||
|
@ -392,14 +392,14 @@ void DolphinApp::InitLanguageSupport()
|
||||
|
||||
if(!m_locale->IsOk())
|
||||
{
|
||||
PanicAlertT("Error loading selected language. Falling back to system default.\n");
|
||||
PanicAlertT("Error loading selected language. Falling back to system default.");
|
||||
delete m_locale;
|
||||
m_locale = new wxLocale(wxLANGUAGE_DEFAULT);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
PanicAlertT("The selected language is not supported by your system. Falling back to system default.\n");
|
||||
PanicAlertT("The selected language is not supported by your system. Falling back to system default.");
|
||||
m_locale = new wxLocale(wxLANGUAGE_DEFAULT);
|
||||
}
|
||||
}
|
||||
|
@ -107,7 +107,8 @@ wxString cache_efb_copies_tooltip = _("When using EFB to RAM we very often need
|
||||
|
||||
VideoConfigDiag::VideoConfigDiag(wxWindow* parent, const std::string &title, const std::string& _ininame)
|
||||
: wxDialog(parent, -1,
|
||||
wxString(wxT("Dolphin ")).append(wxString::FromAscii(title.c_str())).append(_(" Graphics Configuration")),
|
||||
wxString::Format(_("Dolphin %s Graphics Configuration"),
|
||||
wxGetTranslation(wxString::From8BitData(title.c_str()))),
|
||||
wxDefaultPosition, wxDefaultSize)
|
||||
, vconfig(g_Config)
|
||||
, ininame(_ininame)
|
||||
|
@ -29,7 +29,7 @@ class DSPConfigDialogHLE : public wxDialog
|
||||
public:
|
||||
DSPConfigDialogHLE(wxWindow *parent,
|
||||
wxWindowID id = wxID_ANY,
|
||||
const wxString &title = wxT("Dolphin DSP-HLE Plugin Settings"),
|
||||
const wxString &title = _("Dolphin DSP-HLE Plugin Settings"),
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxDEFAULT_DIALOG_STYLE);
|
||||
|
@ -31,6 +31,7 @@ DSPConfigDialogHLE* m_ConfigFrame = NULL;
|
||||
#include "Setup.h"
|
||||
#include "StringUtil.h"
|
||||
#include "LogManager.h"
|
||||
#include "IniFile.h"
|
||||
|
||||
|
||||
// Declarations and definitions
|
||||
@ -64,7 +65,39 @@ DSPState g_dspState;
|
||||
#ifdef _WIN32
|
||||
HINSTANCE g_hInstance;
|
||||
|
||||
#if defined(HAVE_WX) && HAVE_WX
|
||||
wxLocale *InitLanguageSupport()
|
||||
{
|
||||
wxLocale *m_locale;
|
||||
unsigned int language = 0;
|
||||
|
||||
IniFile ini;
|
||||
ini.Load(File::GetUserPath(F_DOLPHINCONFIG_IDX));
|
||||
ini.Get("Interface", "Language", &language, wxLANGUAGE_DEFAULT);
|
||||
|
||||
// Load language if possible, fall back to system default otherwise
|
||||
if(wxLocale::IsAvailable(language))
|
||||
{
|
||||
m_locale = new wxLocale(language);
|
||||
|
||||
m_locale->AddCatalogLookupPathPrefix(wxT("Languages"));
|
||||
|
||||
m_locale->AddCatalog(wxT("dolphin-emu"));
|
||||
|
||||
if(!m_locale->IsOk())
|
||||
{
|
||||
PanicAlertT("Error loading selected language. Falling back to system default.");
|
||||
delete m_locale;
|
||||
m_locale = new wxLocale(wxLANGUAGE_DEFAULT);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
PanicAlertT("The selected language is not supported by your system. Falling back to system default.");
|
||||
m_locale = new wxLocale(wxLANGUAGE_DEFAULT);
|
||||
}
|
||||
return m_locale;
|
||||
}
|
||||
|
||||
class wxDLLApp : public wxApp
|
||||
{
|
||||
bool OnInit()
|
||||
@ -74,27 +107,23 @@ class wxDLLApp : public wxApp
|
||||
};
|
||||
IMPLEMENT_APP_NO_MAIN(wxDLLApp)
|
||||
WXDLLIMPEXP_BASE void wxSetInstance(HINSTANCE hInst);
|
||||
#endif
|
||||
|
||||
BOOL APIENTRY DllMain(HINSTANCE hinstDLL, // DLL module handle
|
||||
DWORD dwReason, // reason called
|
||||
LPVOID lpvReserved) // reserved
|
||||
BOOL APIENTRY DllMain(HINSTANCE hinstDLL, DWORD dwReason, LPVOID lpvReserved)
|
||||
{
|
||||
static wxLocale *m_locale;
|
||||
switch (dwReason)
|
||||
{
|
||||
case DLL_PROCESS_ATTACH:
|
||||
{
|
||||
#if defined(HAVE_WX) && HAVE_WX
|
||||
wxSetInstance((HINSTANCE)hinstDLL);
|
||||
wxInitialize();
|
||||
#endif
|
||||
m_locale = InitLanguageSupport();
|
||||
}
|
||||
break;
|
||||
|
||||
case DLL_PROCESS_DETACH:
|
||||
#if defined(HAVE_WX) && HAVE_WX
|
||||
wxUninitialize();
|
||||
#endif
|
||||
delete m_locale;
|
||||
break;
|
||||
}
|
||||
|
||||
@ -118,7 +147,7 @@ void GetDllInfo(PLUGIN_INFO* _PluginInfo)
|
||||
#elif defined _DEBUG
|
||||
sprintf(_PluginInfo->Name, "Dolphin DSP-HLE Plugin (Debug)");
|
||||
#else
|
||||
sprintf(_PluginInfo->Name, "Dolphin DSP-HLE Plugin");
|
||||
sprintf(_PluginInfo->Name, _trans("Dolphin DSP-HLE Plugin"));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -29,7 +29,7 @@ class DSPConfigDialogLLE : public wxDialog
|
||||
public:
|
||||
DSPConfigDialogLLE(wxWindow *parent,
|
||||
wxWindowID id = wxID_ANY,
|
||||
const wxString &title = wxT("Dolphin DSP-LLE Plugin Settings"),
|
||||
const wxString &title = _("Dolphin DSP-LLE Plugin Settings"),
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxDEFAULT_DIALOG_STYLE);
|
||||
|
@ -23,6 +23,7 @@
|
||||
#include "LogManager.h"
|
||||
#include "Thread.h"
|
||||
#include "ChunkFile.h"
|
||||
#include "IniFile.h"
|
||||
|
||||
#include "Globals.h" // Local
|
||||
#include "DSPInterpreter.h"
|
||||
@ -56,7 +57,39 @@ volatile u32 cycle_count = 0;
|
||||
#ifdef _WIN32
|
||||
HINSTANCE g_hInstance;
|
||||
|
||||
#if defined(HAVE_WX) && HAVE_WX
|
||||
wxLocale *InitLanguageSupport()
|
||||
{
|
||||
wxLocale *m_locale;
|
||||
unsigned int language = 0;
|
||||
|
||||
IniFile ini;
|
||||
ini.Load(File::GetUserPath(F_DOLPHINCONFIG_IDX));
|
||||
ini.Get("Interface", "Language", &language, wxLANGUAGE_DEFAULT);
|
||||
|
||||
// Load language if possible, fall back to system default otherwise
|
||||
if(wxLocale::IsAvailable(language))
|
||||
{
|
||||
m_locale = new wxLocale(language);
|
||||
|
||||
m_locale->AddCatalogLookupPathPrefix(wxT("Languages"));
|
||||
|
||||
m_locale->AddCatalog(wxT("dolphin-emu"));
|
||||
|
||||
if(!m_locale->IsOk())
|
||||
{
|
||||
PanicAlertT("Error loading selected language. Falling back to system default.");
|
||||
delete m_locale;
|
||||
m_locale = new wxLocale(wxLANGUAGE_DEFAULT);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
PanicAlertT("The selected language is not supported by your system. Falling back to system default.");
|
||||
m_locale = new wxLocale(wxLANGUAGE_DEFAULT);
|
||||
}
|
||||
return m_locale;
|
||||
}
|
||||
|
||||
class wxDLLApp : public wxApp
|
||||
{
|
||||
bool OnInit()
|
||||
@ -66,27 +99,23 @@ class wxDLLApp : public wxApp
|
||||
};
|
||||
IMPLEMENT_APP_NO_MAIN(wxDLLApp)
|
||||
WXDLLIMPEXP_BASE void wxSetInstance(HINSTANCE hInst);
|
||||
#endif
|
||||
|
||||
BOOL APIENTRY DllMain(HINSTANCE hinstDLL, // DLL module handle
|
||||
DWORD dwReason, // reason called
|
||||
LPVOID lpvReserved) // reserved
|
||||
BOOL APIENTRY DllMain(HINSTANCE hinstDLL, DWORD dwReason, LPVOID lpvReserved)
|
||||
{
|
||||
static wxLocale *m_locale;
|
||||
switch (dwReason)
|
||||
{
|
||||
case DLL_PROCESS_ATTACH:
|
||||
{
|
||||
#if defined(HAVE_WX) && HAVE_WX
|
||||
wxSetInstance((HINSTANCE)hinstDLL);
|
||||
wxInitialize();
|
||||
#endif
|
||||
m_locale = InitLanguageSupport();
|
||||
}
|
||||
break;
|
||||
|
||||
case DLL_PROCESS_DETACH:
|
||||
#if defined(HAVE_WX) && HAVE_WX
|
||||
wxUninitialize();
|
||||
#endif
|
||||
delete m_locale;
|
||||
break;
|
||||
}
|
||||
|
||||
@ -102,12 +131,10 @@ void GetDllInfo(PLUGIN_INFO* _PluginInfo)
|
||||
|
||||
#ifdef DEBUGFAST
|
||||
sprintf(_PluginInfo->Name, "Dolphin DSP-LLE Plugin (DebugFast)");
|
||||
#else
|
||||
#ifndef _DEBUG
|
||||
sprintf(_PluginInfo->Name, "Dolphin DSP-LLE Plugin");
|
||||
#else
|
||||
#elif defined _DEBUG
|
||||
sprintf(_PluginInfo->Name, "Dolphin DSP-LLE Plugin (Debug)");
|
||||
#endif
|
||||
#else
|
||||
sprintf(_PluginInfo->Name, _trans("Dolphin DSP-LLE Plugin"));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -54,51 +54,76 @@
|
||||
#include "FramebufferManager.h"
|
||||
#include "DLCache.h"
|
||||
#include "DebuggerPanel.h"
|
||||
#include "IniFile.h"
|
||||
|
||||
HINSTANCE g_hInstance = NULL;
|
||||
|
||||
wxLocale *InitLanguageSupport()
|
||||
{
|
||||
wxLocale *m_locale;
|
||||
unsigned int language = 0;
|
||||
|
||||
IniFile ini;
|
||||
ini.Load(File::GetUserPath(F_DOLPHINCONFIG_IDX));
|
||||
ini.Get("Interface", "Language", &language, wxLANGUAGE_DEFAULT);
|
||||
|
||||
// Load language if possible, fall back to system default otherwise
|
||||
if(wxLocale::IsAvailable(language))
|
||||
{
|
||||
m_locale = new wxLocale(language);
|
||||
|
||||
m_locale->AddCatalogLookupPathPrefix(wxT("Languages"));
|
||||
|
||||
m_locale->AddCatalog(wxT("dolphin-emu"));
|
||||
|
||||
if(!m_locale->IsOk())
|
||||
{
|
||||
PanicAlertT("Error loading selected language. Falling back to system default.");
|
||||
delete m_locale;
|
||||
m_locale = new wxLocale(wxLANGUAGE_DEFAULT);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
PanicAlertT("The selected language is not supported by your system. Falling back to system default.");
|
||||
m_locale = new wxLocale(wxLANGUAGE_DEFAULT);
|
||||
}
|
||||
return m_locale;
|
||||
}
|
||||
|
||||
// This is used for the functions right below here which use wxwidgets
|
||||
#if defined(HAVE_WX) && HAVE_WX
|
||||
WXDLLIMPEXP_BASE void wxSetInstance(HINSTANCE hInst);
|
||||
#endif
|
||||
|
||||
void *DllDebugger(void *_hParent, bool Show)
|
||||
{
|
||||
#if defined(HAVE_WX) && HAVE_WX
|
||||
return new GFXDebuggerPanel((wxWindow*)_hParent);
|
||||
#else
|
||||
return NULL;
|
||||
#endif
|
||||
}
|
||||
|
||||
#if defined(HAVE_WX) && HAVE_WX
|
||||
class wxDLLApp : public wxApp
|
||||
class wxDLLApp : public wxApp
|
||||
{
|
||||
bool OnInit()
|
||||
{
|
||||
bool OnInit()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
};
|
||||
IMPLEMENT_APP_NO_MAIN(wxDLLApp)
|
||||
WXDLLIMPEXP_BASE void wxSetInstance(HINSTANCE hInst);
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
};
|
||||
IMPLEMENT_APP_NO_MAIN(wxDLLApp)
|
||||
WXDLLIMPEXP_BASE void wxSetInstance(HINSTANCE hInst);
|
||||
|
||||
BOOL APIENTRY DllMain(HINSTANCE hinstDLL, DWORD dwReason, LPVOID lpvReserved)
|
||||
{
|
||||
static wxLocale *m_locale;
|
||||
switch (dwReason)
|
||||
{
|
||||
case DLL_PROCESS_ATTACH:
|
||||
{
|
||||
#if defined(HAVE_WX) && HAVE_WX
|
||||
wxSetInstance((HINSTANCE)hinstDLL);
|
||||
wxInitialize();
|
||||
#endif
|
||||
m_locale = InitLanguageSupport();
|
||||
}
|
||||
break;
|
||||
case DLL_PROCESS_DETACH:
|
||||
#if defined(HAVE_WX) && HAVE_WX
|
||||
wxUninitialize();
|
||||
#endif
|
||||
delete m_locale;
|
||||
break;
|
||||
}
|
||||
|
||||
@ -136,7 +161,7 @@ void GetDllInfo(PLUGIN_INFO* _PluginInfo)
|
||||
#elif defined _DEBUG
|
||||
sprintf_s(_PluginInfo->Name, 100, "Dolphin Direct3D11 (Debug)");
|
||||
#else
|
||||
sprintf_s(_PluginInfo->Name, 100, "Dolphin Direct3D11");
|
||||
sprintf_s(_PluginInfo->Name, 100, _trans("Dolphin Direct3D11"));
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -209,7 +234,7 @@ void DllConfig(void *_hParent)
|
||||
|
||||
factory->Release();
|
||||
|
||||
VideoConfigDiag *const diag = new VideoConfigDiag((wxWindow*)_hParent, "Direct3D11", "gfx_dx11");
|
||||
VideoConfigDiag *const diag = new VideoConfigDiag((wxWindow*)_hParent, _trans("Direct3D11"), "gfx_dx11");
|
||||
diag->ShowModal();
|
||||
diag->Destroy();
|
||||
|
||||
|
@ -52,51 +52,77 @@
|
||||
#include "XFBConvert.h"
|
||||
#include "render.h"
|
||||
#include "DLCache.h"
|
||||
#include "IniFile.h"
|
||||
|
||||
HINSTANCE g_hInstance = NULL;
|
||||
|
||||
wxLocale *InitLanguageSupport()
|
||||
{
|
||||
wxLocale *m_locale;
|
||||
unsigned int language = 0;
|
||||
|
||||
IniFile ini;
|
||||
ini.Load(File::GetUserPath(F_DOLPHINCONFIG_IDX));
|
||||
ini.Get("Interface", "Language", &language, wxLANGUAGE_DEFAULT);
|
||||
|
||||
// Load language if possible, fall back to system default otherwise
|
||||
if(wxLocale::IsAvailable(language))
|
||||
{
|
||||
m_locale = new wxLocale(language);
|
||||
|
||||
m_locale->AddCatalogLookupPathPrefix(wxT("Languages"));
|
||||
|
||||
m_locale->AddCatalog(wxT("dolphin-emu"));
|
||||
|
||||
if(!m_locale->IsOk())
|
||||
{
|
||||
PanicAlertT("Error loading selected language. Falling back to system default.");
|
||||
delete m_locale;
|
||||
m_locale = new wxLocale(wxLANGUAGE_DEFAULT);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
PanicAlertT("The selected language is not supported by your system. Falling back to system default.");
|
||||
m_locale = new wxLocale(wxLANGUAGE_DEFAULT);
|
||||
}
|
||||
return m_locale;
|
||||
}
|
||||
|
||||
|
||||
// This is used for the functions right below here which use wxwidgets
|
||||
#if defined(HAVE_WX) && HAVE_WX
|
||||
WXDLLIMPEXP_BASE void wxSetInstance(HINSTANCE hInst);
|
||||
#endif
|
||||
|
||||
void *DllDebugger(void *_hParent, bool Show)
|
||||
{
|
||||
#if defined(HAVE_WX) && HAVE_WX
|
||||
return new GFXDebuggerPanel((wxWindow*)_hParent);
|
||||
#else
|
||||
return NULL;
|
||||
#endif
|
||||
}
|
||||
|
||||
#if defined(HAVE_WX) && HAVE_WX
|
||||
class wxDLLApp : public wxApp
|
||||
class wxDLLApp : public wxApp
|
||||
{
|
||||
bool OnInit()
|
||||
{
|
||||
bool OnInit()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
};
|
||||
IMPLEMENT_APP_NO_MAIN(wxDLLApp)
|
||||
WXDLLIMPEXP_BASE void wxSetInstance(HINSTANCE hInst);
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
};
|
||||
IMPLEMENT_APP_NO_MAIN(wxDLLApp)
|
||||
WXDLLIMPEXP_BASE void wxSetInstance(HINSTANCE hInst);
|
||||
|
||||
BOOL APIENTRY DllMain(HINSTANCE hinstDLL, DWORD dwReason, LPVOID lpvReserved)
|
||||
{
|
||||
static wxLocale *m_locale;
|
||||
switch (dwReason)
|
||||
{
|
||||
case DLL_PROCESS_ATTACH:
|
||||
{
|
||||
#if defined(HAVE_WX) && HAVE_WX
|
||||
wxSetInstance((HINSTANCE)hinstDLL);
|
||||
wxInitialize();
|
||||
#endif
|
||||
m_locale = InitLanguageSupport();
|
||||
}
|
||||
break;
|
||||
case DLL_PROCESS_DETACH:
|
||||
#if defined(HAVE_WX) && HAVE_WX
|
||||
wxUninitialize();
|
||||
#endif
|
||||
delete m_locale;
|
||||
break;
|
||||
}
|
||||
|
||||
@ -134,7 +160,7 @@ void GetDllInfo(PLUGIN_INFO* _PluginInfo)
|
||||
#elif defined _DEBUG
|
||||
sprintf_s(_PluginInfo->Name, 100, "Dolphin Direct3D9 (Debug)");
|
||||
#else
|
||||
sprintf_s(_PluginInfo->Name, 100, "Dolphin Direct3D9");
|
||||
sprintf_s(_PluginInfo->Name, 100, _trans("Dolphin Direct3D9"));
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -186,7 +212,7 @@ void DllConfig(void *_hParent)
|
||||
}
|
||||
|
||||
|
||||
VideoConfigDiag *const diag = new VideoConfigDiag((wxWindow*)_hParent, "Direct3D9", "gfx_dx9");
|
||||
VideoConfigDiag *const diag = new VideoConfigDiag((wxWindow*)_hParent, _trans("Direct3D9"), "gfx_dx9");
|
||||
diag->ShowModal();
|
||||
diag->Destroy();
|
||||
|
||||
|
@ -58,6 +58,7 @@ Make AA apply instantly during gameplay if possible
|
||||
|
||||
#ifdef _WIN32
|
||||
#include "EmuWindow.h"
|
||||
#include "IniFile.h"
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_WX) && HAVE_WX
|
||||
@ -100,43 +101,71 @@ int GLScissorX, GLScissorY, GLScissorW, GLScissorH;
|
||||
#ifdef _WIN32
|
||||
HINSTANCE g_hInstance;
|
||||
|
||||
#if defined(HAVE_WX) && HAVE_WX
|
||||
wxLocale *InitLanguageSupport()
|
||||
{
|
||||
wxLocale *m_locale;
|
||||
unsigned int language = 0;
|
||||
|
||||
IniFile ini;
|
||||
ini.Load(File::GetUserPath(F_DOLPHINCONFIG_IDX));
|
||||
ini.Get("Interface", "Language", &language, wxLANGUAGE_DEFAULT);
|
||||
|
||||
// Load language if possible, fall back to system default otherwise
|
||||
if(wxLocale::IsAvailable(language))
|
||||
{
|
||||
m_locale = new wxLocale(language);
|
||||
|
||||
m_locale->AddCatalogLookupPathPrefix(wxT("Languages"));
|
||||
|
||||
m_locale->AddCatalog(wxT("dolphin-emu"));
|
||||
|
||||
if(!m_locale->IsOk())
|
||||
{
|
||||
PanicAlertT("Error loading selected language. Falling back to system default.");
|
||||
delete m_locale;
|
||||
m_locale = new wxLocale(wxLANGUAGE_DEFAULT);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
PanicAlertT("The selected language is not supported by your system. Falling back to system default.");
|
||||
m_locale = new wxLocale(wxLANGUAGE_DEFAULT);
|
||||
}
|
||||
return m_locale;
|
||||
}
|
||||
|
||||
class wxDLLApp : public wxApp
|
||||
{
|
||||
bool OnInit()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
bool OnInit()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
};
|
||||
IMPLEMENT_APP_NO_MAIN(wxDLLApp)
|
||||
WXDLLIMPEXP_BASE void wxSetInstance(HINSTANCE hInst);
|
||||
#endif
|
||||
// ------------------
|
||||
|
||||
BOOL APIENTRY DllMain(HINSTANCE hinstDLL, // DLL module handle
|
||||
DWORD dwReason, // reason called
|
||||
LPVOID lpvReserved) // reserved
|
||||
BOOL APIENTRY DllMain(HINSTANCE hinstDLL, DWORD dwReason, LPVOID lpvReserved)
|
||||
{
|
||||
switch (dwReason)
|
||||
{
|
||||
case DLL_PROCESS_ATTACH:
|
||||
{
|
||||
#if defined(HAVE_WX) && HAVE_WX
|
||||
wxSetInstance((HINSTANCE)hinstDLL);
|
||||
wxInitialize();
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
static wxLocale *m_locale;
|
||||
switch (dwReason)
|
||||
{
|
||||
case DLL_PROCESS_ATTACH:
|
||||
{
|
||||
wxSetInstance((HINSTANCE)hinstDLL);
|
||||
wxInitialize();
|
||||
m_locale = InitLanguageSupport();
|
||||
}
|
||||
break;
|
||||
|
||||
case DLL_PROCESS_DETACH:
|
||||
#if defined(HAVE_WX) && HAVE_WX
|
||||
wxUninitialize();
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
case DLL_PROCESS_DETACH:
|
||||
wxUninitialize();
|
||||
delete m_locale;
|
||||
break;
|
||||
}
|
||||
|
||||
g_hInstance = hinstDLL;
|
||||
return TRUE;
|
||||
g_hInstance = hinstDLL;
|
||||
return TRUE;
|
||||
}
|
||||
#endif // _WIN32
|
||||
|
||||
@ -149,7 +178,7 @@ void GetDllInfo(PLUGIN_INFO* _PluginInfo)
|
||||
#elif defined _DEBUG
|
||||
sprintf(_PluginInfo->Name, "Dolphin OpenGL (Debug)");
|
||||
#else
|
||||
sprintf(_PluginInfo->Name, "Dolphin OpenGL");
|
||||
sprintf(_PluginInfo->Name, _trans("Dolphin OpenGL"));
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -214,7 +243,7 @@ void DllConfig(void *_hParent)
|
||||
// pp shaders
|
||||
GetShaders(g_Config.backend_info.PPShaders);
|
||||
|
||||
VideoConfigDiag *const diag = new VideoConfigDiag((wxWindow*)_hParent, "OpenGL", "gfx_opengl");
|
||||
VideoConfigDiag *const diag = new VideoConfigDiag((wxWindow*)_hParent, _trans("OpenGL"), "gfx_opengl");
|
||||
diag->ShowModal();
|
||||
diag->Destroy();
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user