mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-15 22:09:19 -07:00
8d4a47d40c
The libusb driver must be installed on the adapter (e.g. zadig can be used to install the driver in Windows). GameCube pad controllers are supported and will override the current input device assigned to the port. GameCube controller buttons are auto-configured and cannot be re-assigned. Rumble is supported. Hotplug is supported while playing a game. If a controller is unplugged from the adapter, Dolphin will fallback to using the host input device on that port. If a port on the adapter is unused, Dolphin will use the host input device for that port, allowing a mixture of host input devices and controllers connected to the adapter. The adapter support can be disabled in the Controllers config if the OS driver is preferred (allowing the pad buttons to be reconfigured). One adapter per system is supported.
73 lines
2.2 KiB
C++
73 lines
2.2 KiB
C++
// Copyright 2014 Dolphin Emulator Project
|
|
// Licensed under GPLv2
|
|
// Refer to the license.txt file included.
|
|
|
|
#include "Common/CommonPaths.h"
|
|
#include "Common/FileUtil.h"
|
|
#include "Common/Logging/LogManager.h"
|
|
|
|
#include "Core/ConfigManager.h"
|
|
#if defined(__LIBUSB__) || defined (_WIN32)
|
|
#include "Core/HW/SI_GCAdapter.h"
|
|
#endif
|
|
#include "Core/HW/Wiimote.h"
|
|
|
|
#include "UICommon/UICommon.h"
|
|
|
|
#include "VideoCommon/VideoBackendBase.h"
|
|
|
|
namespace UICommon
|
|
{
|
|
|
|
void Init()
|
|
{
|
|
LogManager::Init();
|
|
SConfig::Init();
|
|
VideoBackend::PopulateList();
|
|
WiimoteReal::LoadSettings();
|
|
#if defined(__LIBUSB__) || defined (_WIN32)
|
|
SI_GCAdapter::Init();
|
|
#endif
|
|
VideoBackend::ActivateBackend(SConfig::GetInstance().m_LocalCoreStartupParameter.m_strVideoBackend);
|
|
|
|
SetEnableAlert(SConfig::GetInstance().m_LocalCoreStartupParameter.bUsePanicHandlers);
|
|
}
|
|
|
|
void Shutdown()
|
|
{
|
|
#if defined(__LIBUSB__) || defined (_WIN32)
|
|
SI_GCAdapter::Shutdown();
|
|
#endif
|
|
WiimoteReal::Shutdown();
|
|
VideoBackend::ClearList();
|
|
SConfig::Shutdown();
|
|
LogManager::Shutdown();
|
|
}
|
|
|
|
void CreateDirectories()
|
|
{
|
|
// Copy initial Wii NAND data from Sys to User.
|
|
File::CopyDir(File::GetSysDirectory() + WII_USER_DIR DIR_SEP,
|
|
File::GetUserPath(D_WIIUSER_IDX));
|
|
|
|
File::CreateFullPath(File::GetUserPath(D_USER_IDX));
|
|
File::CreateFullPath(File::GetUserPath(D_CACHE_IDX));
|
|
File::CreateFullPath(File::GetUserPath(D_CONFIG_IDX));
|
|
File::CreateFullPath(File::GetUserPath(D_DUMPDSP_IDX));
|
|
File::CreateFullPath(File::GetUserPath(D_DUMPTEXTURES_IDX));
|
|
File::CreateFullPath(File::GetUserPath(D_GAMESETTINGS_IDX));
|
|
File::CreateFullPath(File::GetUserPath(D_GCUSER_IDX));
|
|
File::CreateFullPath(File::GetUserPath(D_GCUSER_IDX) + USA_DIR DIR_SEP);
|
|
File::CreateFullPath(File::GetUserPath(D_GCUSER_IDX) + EUR_DIR DIR_SEP);
|
|
File::CreateFullPath(File::GetUserPath(D_GCUSER_IDX) + JAP_DIR DIR_SEP);
|
|
File::CreateFullPath(File::GetUserPath(D_HIRESTEXTURES_IDX));
|
|
File::CreateFullPath(File::GetUserPath(D_MAILLOGS_IDX));
|
|
File::CreateFullPath(File::GetUserPath(D_MAPS_IDX));
|
|
File::CreateFullPath(File::GetUserPath(D_SCREENSHOTS_IDX));
|
|
File::CreateFullPath(File::GetUserPath(D_SHADERS_IDX));
|
|
File::CreateFullPath(File::GetUserPath(D_STATESAVES_IDX));
|
|
File::CreateFullPath(File::GetUserPath(D_THEMES_IDX));
|
|
}
|
|
|
|
} // namespace UICommon
|