Allow loading controller profiles from game ini.
Currently loads the same profile for all 4 controllers, and overwrites the default control settings.
This commit is contained in:
1 parent
4f4aa4860d
commit
b8691df723
6 files changed
+25
-8
No files matched your search
@@ -47,7 +47,6 @@
|
||||
#include "VideoBackendBase.h"
|
||||
#include "Movie.h"
|
||||
|
||||
|
||||
namespace BootManager
|
||||
{
|
||||
|
||||
@@ -137,6 +136,11 @@ bool BootCore(const std::string& _rFilename)
|
||||
}
|
||||
}
|
||||
|
||||
if (game_ini.Exists("Core", "WiiProfile"))
|
||||
game_ini.Get("Core", "WiiProfile", &StartUp.strWiiControllerProfile);
|
||||
if (game_ini.Exists("Core", "GCProfile"))
|
||||
game_ini.Get("Core", "GCProfile", &StartUp.strGCControllerProfile);
|
||||
|
||||
// Run the game
|
||||
// Init the core
|
||||
if (!Core::Init())
|
||||
@@ -169,6 +173,8 @@ void Stop()
|
||||
StartUp.bDSPHLE = config_cache.bDSPHLE;
|
||||
StartUp.bDisableWiimoteSpeaker = config_cache.bDisableWiimoteSpeaker;
|
||||
StartUp.m_strVideoBackend = config_cache.strBackend;
|
||||
StartUp.strGCControllerProfile = "";
|
||||
StartUp.strWiiControllerProfile = "";
|
||||
VideoBackend::ActivateBackend(StartUp.m_strVideoBackend);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -138,7 +138,9 @@ struct SCoreStartupParameter
|
||||
|
||||
int iTheme;
|
||||
int iPosX, iPosY, iWidth, iHeight;
|
||||
|
||||
|
||||
std::string strGCControllerProfile;
|
||||
std::string strWiiControllerProfile;
|
||||
enum EBootBS2
|
||||
{
|
||||
BOOT_DEFAULT,
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
|
||||
#include "ControllerInterface/ControllerInterface.h"
|
||||
#include "GCPadEmu.h"
|
||||
#include "../ConfigManager.h"
|
||||
|
||||
#include "../../InputCommon/Src/InputConfig.h"
|
||||
|
||||
@@ -55,7 +56,7 @@ void Initialize(void* const hwnd)
|
||||
g_controller_interface.Initialize();
|
||||
|
||||
// load the saved controller config
|
||||
g_plugin.LoadConfig();
|
||||
g_plugin.LoadConfig(SConfig::GetInstance().m_LocalCoreStartupParameter.strGCControllerProfile);
|
||||
}
|
||||
|
||||
void GetStatus(u8 _numPAD, SPADStatus* _pPADStatus)
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#include "WiimoteReal/WiimoteReal.h"
|
||||
#include "WiimoteEmu/WiimoteEmu.h"
|
||||
#include "Movie.h"
|
||||
#include "../ConfigManager.h"
|
||||
|
||||
#include "ControllerInterface/ControllerInterface.h"
|
||||
|
||||
@@ -44,7 +45,7 @@ void Initialize(void* const hwnd)
|
||||
g_controller_interface.SetHwnd(hwnd);
|
||||
g_controller_interface.Initialize();
|
||||
|
||||
g_plugin.LoadConfig();
|
||||
g_plugin.LoadConfig(SConfig::GetInstance().m_LocalCoreStartupParameter.strWiiControllerProfile);
|
||||
|
||||
WiimoteReal::Initialize();
|
||||
|
||||
|
||||
Reference in new issue
Block a user