dolphin/Source/Core/InputCommon/ControllerEmu/ControlGroup/PrimeHackModes.cpp
Desmondchaser27 4ac3c2b339
Add Feature For Morphball Profiles for Metroid Prime 3 (#91)
* Adding in morphball profiles.

* Fixing bug where profile didn't load immediately when selecting the profile nor when saving the current profile.

* One last change to remove leftover code.

* Fixing coding standard issues.  Moved morphball profile switch into a function in PrimeUtils to more consistent with Primehack, per PR request.

* Adding support for the PrimeHack tab on the standard "Emulated Wiimote" controller GUI.

* Quick rename to "Morphball Profile" on Metroid Wiimote controller just for uniformity with the standard Emulated Wiimote controller menu.

* Updating support for Morphball Profile to work on all the Wii versions of Metroid Prime series.

* Fixed bugs made when rushing... Yeah!
2022-01-29 19:34:59 +00:00

36 lines
880 B
C++

#include "InputCommon/ControllerEmu/ControlGroup/PrimeHackModes.h"
#include "InputCommon/ControllerInterface/ControllerInterface.h"
namespace ControllerEmu
{
PrimeHackModes::PrimeHackModes(const std::string& name_) : ControlGroup(name_, GroupType::PrimeHackMode)
{
}
// Always return controller mode for platforms with input APIs we don't support.
int PrimeHackModes::GetSelectedDevice() const
{
if (GetMouseSupported()) {
return m_selection_setting.GetValue();
}
else {
return 1;
}
}
// Check to see if we're on a platform with a mouse class.
bool PrimeHackModes::GetMouseSupported() const
{
#if defined CIFACE_USE_WIN32 || defined CIFACE_USE_XLIB
return true;
#else
return false;
#endif
}
void PrimeHackModes::SetSelectedDevice(int val)
{
m_selection_setting.SetValue(val);
}
} // namespace ControllerEmu