mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-02-11 00:40:16 +00:00
some cleanup
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1227 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
58f998cb55
commit
12a8174446
@ -86,6 +86,7 @@ void GetMousePos(float& x, float& y)
|
||||
x = point.x / (float)width;
|
||||
y = point.y / (float)height;
|
||||
#else
|
||||
// TODO fix on linux
|
||||
x = 0.5f;
|
||||
y = 0.5f;
|
||||
#endif
|
||||
|
@ -37,7 +37,7 @@ namespace WiiMoteReal
|
||||
#define MAX_WIIMOTES 1
|
||||
|
||||
//******************************************************************************
|
||||
// Forwording
|
||||
// Forwarding
|
||||
//******************************************************************************
|
||||
|
||||
class CWiiMote;
|
||||
@ -57,7 +57,7 @@ namespace WiiMoteReal
|
||||
bool g_Shutdown = false;
|
||||
|
||||
//******************************************************************************
|
||||
// Prolly this class should be in its own file
|
||||
// Probably this class should be in its own file
|
||||
//******************************************************************************
|
||||
|
||||
class CWiiMote
|
||||
@ -100,7 +100,8 @@ namespace WiiMoteReal
|
||||
m_pCriticalSection->Leave();
|
||||
}
|
||||
|
||||
// read data from wiimote (but don't send it to the core, just filter and queue)
|
||||
// read data from wiimote (but don't send it to the core, just filter
|
||||
// and queue)
|
||||
void ReadData()
|
||||
{
|
||||
m_pCriticalSection->Enter();
|
||||
@ -118,7 +119,8 @@ namespace WiiMoteReal
|
||||
{
|
||||
const byte* pBuffer = m_pWiiMote->event_buf;
|
||||
|
||||
// check if we have a channel (connection) if so save the data...
|
||||
// check if we have a channel (connection) if so save the
|
||||
// data...
|
||||
if (m_channelID > 0)
|
||||
{
|
||||
m_pCriticalSection->Enter();
|
||||
@ -126,13 +128,15 @@ namespace WiiMoteReal
|
||||
// filter out reports
|
||||
if (pBuffer[0] >= 0x30)
|
||||
{
|
||||
memcpy(m_LastReport.m_PayLoad, pBuffer, MAX_PAYLOAD);
|
||||
memcpy(m_LastReport.m_PayLoad, pBuffer,
|
||||
MAX_PAYLOAD);
|
||||
m_LastReportValid = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
SEvent ImportantEvent;
|
||||
memcpy(ImportantEvent.m_PayLoad, pBuffer, MAX_PAYLOAD);
|
||||
memcpy(ImportantEvent.m_PayLoad, pBuffer,
|
||||
MAX_PAYLOAD);
|
||||
m_EventReadQueue.push(ImportantEvent);
|
||||
}
|
||||
|
||||
@ -218,12 +222,10 @@ namespace WiiMoteReal
|
||||
g_WiiMotes[i] = new CWiiMote(i+1, g_WiiMotesFromWiiUse[i]);
|
||||
}
|
||||
|
||||
if (g_NumberOfWiiMotes == 0)
|
||||
return 0;
|
||||
|
||||
if (g_NumberOfWiiMotes > 0)
|
||||
g_pReadThread = new Common::Thread(ReadWiimote_ThreadFunc, NULL);
|
||||
|
||||
return true;
|
||||
return g_NumberOfWiiMotes;
|
||||
}
|
||||
|
||||
void DoState(void* ptr, int mode)
|
||||
|
Loading…
x
Reference in New Issue
Block a user