@@ -37,7 +37,6 @@ class MappingWindow final : public QDialog
MAPPING_GC_DANCEMAT,
MAPPING_GC_KEYBOARD,
MAPPING_GCPAD,
MAPPING_GCPAD_WIIU,
MAPPING_GC_STEERINGWHEEL,
// Wii
MAPPING_WIIMOTE_EMU,
@@ -46,8 +45,7 @@ class MappingWindow final : public QDialog
MAPPING_HOTKEYS
};

explicit MappingWindow(QWidget* parent, int port_num);
void ChangeMappingType(Type type);
explicit MappingWindow(QWidget* parent, Type type, int port_num);

int GetPort() const;
const ciface::Core::DeviceQualifier& GetDeviceQualifier() const;
@@ -59,15 +57,14 @@ class MappingWindow final : public QDialog
void ClearFields();

private:
void SetMappingType(Type type);
void CreateDevicesLayout();
void CreateProfilesLayout();
void CreateResetLayout();
void CreateMainLayout();
void ConnectWidgets();

void SetLayoutComplex(bool is_complex);
void AddWidget(const QString& name, QWidget* widget);
void ClearWidgets();

void RefreshDevices();

@@ -108,7 +105,6 @@ class MappingWindow final : public QDialog

Type m_mapping_type;
const int m_port;
bool m_is_complex;
InputConfig* m_config;
ciface::Core::DeviceQualifier m_devq;
};
@@ -177,7 +177,7 @@
<ClCompile Include="Config\InfoWidget.cpp" />
<ClCompile Include="Config\Mapping\GCKeyboardEmu.cpp" />
<ClCompile Include="Config\Mapping\GCPadEmu.cpp" />
<ClCompile Include="Config\Mapping\GCPadWiiU.cpp" />
<ClCompile Include="Config\Mapping\GCPadWiiUConfigDialog.cpp" />
<ClCompile Include="Config\Mapping\Hotkey3D.cpp" />
<ClCompile Include="Config\Mapping\HotkeyGeneral.cpp" />
<ClCompile Include="Config\Mapping\HotkeyGraphics.cpp" />
@@ -73,6 +73,8 @@ MainWindow::MainWindow(std::unique_ptr<BootParameters> boot_parameters) : QMainW
setUnifiedTitleAndToolBarOnMac(true);
setAcceptDrops(true);

InitControllers();

CreateComponents();

ConnectGameList();
@@ -81,7 +83,6 @@ MainWindow::MainWindow(std::unique_ptr<BootParameters> boot_parameters) : QMainW
ConnectStack();
ConnectMenuBar();

InitControllers();
InitCoreCallbacks();

NetPlayInit();
@@ -154,7 +155,7 @@ void MainWindow::CreateComponents()
m_stack = new QStackedWidget(this);
m_controllers_window = new ControllersWindow(this);
m_settings_window = new SettingsWindow(this);
m_hotkey_window = new MappingWindow(this, 0);
m_hotkey_window = new MappingWindow(this, MappingWindow::Type::MAPPING_HOTKEYS, 0);
m_log_widget = new LogWidget(this);
m_log_config_widget = new LogConfigWidget(this);

@@ -570,7 +571,6 @@ void MainWindow::ShowAboutDialog()

void MainWindow::ShowHotkeyDialog()
{
m_hotkey_window->ChangeMappingType(MappingWindow::Type::MAPPING_HOTKEYS);
m_hotkey_window->show();
m_hotkey_window->raise();
m_hotkey_window->activateWindow();