Fix IR pointer of emulated Wiimote if sensor bar position is set to bottom.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7490 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
770b0d4552
commit
fdc05bfe29
|
@ -29,6 +29,7 @@
|
||||||
#include "Timer.h"
|
#include "Timer.h"
|
||||||
#include "Common.h"
|
#include "Common.h"
|
||||||
#include "../../Host.h"
|
#include "../../Host.h"
|
||||||
|
#include "../../ConfigManager.h"
|
||||||
|
|
||||||
#include "UDPTLayer.h"
|
#include "UDPTLayer.h"
|
||||||
|
|
||||||
|
@ -299,6 +300,9 @@ Wiimote::Wiimote( const unsigned int index )
|
||||||
m_options->settings.push_back(new ControlGroup::Setting(_trans("Sideways Wiimote"), false));
|
m_options->settings.push_back(new ControlGroup::Setting(_trans("Sideways Wiimote"), false));
|
||||||
m_options->settings.push_back(new ControlGroup::Setting(_trans("Upright Wiimote"), false));
|
m_options->settings.push_back(new ControlGroup::Setting(_trans("Upright Wiimote"), false));
|
||||||
|
|
||||||
|
// TODO: This value should probably be re-read if SYSCONF gets changed
|
||||||
|
m_sensor_bar_on_top = (bool)SConfig::GetInstance().m_SYSCONF->GetData<u8>("BT.BAR");
|
||||||
|
|
||||||
// --- reset eeprom/register/values to default ---
|
// --- reset eeprom/register/values to default ---
|
||||||
Reset();
|
Reset();
|
||||||
}
|
}
|
||||||
|
@ -474,7 +478,8 @@ void Wiimote::GetIRData(u8* const data, bool use_accel)
|
||||||
for (int i=0; i<4; i++)
|
for (int i=0; i<4; i++)
|
||||||
{
|
{
|
||||||
v[i].x=xx*(bndright-bndleft)/2+(bndleft+bndright)/2;
|
v[i].x=xx*(bndright-bndleft)/2+(bndleft+bndright)/2;
|
||||||
v[i].y=yy*(bndup-bnddown)/2+(bndup+bnddown)/2;
|
if (m_sensor_bar_on_top) v[i].y=yy*(bndup-bnddown)/2+(bndup+bnddown)/2;
|
||||||
|
else v[i].y=yy*(bndup-bnddown)/2-(bndup+bnddown)/2;
|
||||||
v[i].z=0;
|
v[i].z=0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -170,6 +170,8 @@ private:
|
||||||
|
|
||||||
u8 m_shake_step[3];
|
u8 m_shake_step[3];
|
||||||
|
|
||||||
|
bool m_sensor_bar_on_top;
|
||||||
|
|
||||||
wm_status_report m_status;
|
wm_status_report m_status;
|
||||||
|
|
||||||
ADPCMState m_adpcm_state;
|
ADPCMState m_adpcm_state;
|
||||||
|
|
Loading…
Reference in New Issue