Qt: Get rid of wx module init

We're not using any wx thread junk anymore, so this can go.
This commit is contained in:
Connor McLaughlin 2022-05-19 16:16:42 +10:00 committed by refractionpcsx2
parent 1afb248e4d
commit b1d6d84e6f
1 changed files with 0 additions and 23 deletions

View File

@ -53,7 +53,6 @@ static constexpr u32 SETTINGS_SAVE_DELAY = 1000;
// Local function declarations // Local function declarations
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
namespace QtHost { namespace QtHost {
static void InitializeWxRubbish();
static bool InitializeConfig(); static bool InitializeConfig();
static bool ShouldUsePortableMode(); static bool ShouldUsePortableMode();
static void SetResourcesDirectory(); static void SetResourcesDirectory();
@ -84,7 +83,6 @@ bool QtHost::Initialize()
qRegisterMetaType<InputBindingKey>(); qRegisterMetaType<InputBindingKey>();
qRegisterMetaType<const GameList::Entry*>(); qRegisterMetaType<const GameList::Entry*>();
InitializeWxRubbish();
if (!InitializeConfig()) if (!InitializeConfig())
{ {
Console.WriteLn("Failed to initialize config."); Console.WriteLn("Failed to initialize config.");
@ -769,24 +767,3 @@ void QtHost::UpdateLogging()
SetSystemConsoleEnabled(system_console_enabled); SetSystemConsoleEnabled(system_console_enabled);
} }
#include <wx/module.h>
#ifdef _WIN32
extern "C" HINSTANCE wxGetInstance();
extern void wxSetInstance(HINSTANCE hInst);
#endif
void QtHost::InitializeWxRubbish()
{
wxLog::DoCreateOnDemand();
wxLog::GetActiveTarget();
#ifdef _WIN32
if (!wxGetInstance())
wxSetInstance(::GetModuleHandle(NULL));
#endif // _WIN32
wxModule::RegisterModules();
wxModule::InitializeModules();
}