Wiimote: Show the decrypted Nunchuck calibration values in the log when a real Wiimote and Nunchuck is used. Fixed an earlier bug that made the neutral emulated nunchuck accelerometer values zero, now they are back to 0x80,0x80,0xb3.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2104 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
John Peterson
2009-02-04 06:40:05 +00:00
parent 701d4146b6
commit cf303e70e9
11 changed files with 222 additions and 167 deletions

View File

@ -151,14 +151,13 @@ std::string StringFromFormat(const char* format, ...)
// ----------------
std::string ArrayToString(const u8 *data, u32 size, u32 offset, int line_len, bool Spaces)
{
//const u8* _data = (const u8*)data;
std::string Temp;
for (u32 i = 0; i < size; i++)
{
char Buffer[128];
if (Spaces) sprintf(Buffer, "%02x ", data[i + offset]);
else sprintf(Buffer, "%02x", data[i + offset]);
if((i + 1) % line_len == 0) Temp.append("\n"); // break long lines
if(i > 0 && i % line_len == 0) Temp.append("\n"); // break long lines
Temp.append(Buffer);
}
return Temp;