cleanup
This commit is contained in:
@@ -33,24 +33,20 @@ void LightsDriver_LinuxParallel::Set( const LightsState *ls )
|
||||
{
|
||||
// Set LightState to port
|
||||
CString s;
|
||||
unsigned char output;
|
||||
int i = 0;
|
||||
|
||||
// Prepare Screen Output too for debugging
|
||||
s += "LinuxParallel Lights Driver Debug\n";
|
||||
s += "Lights Mode: " + LightsModeToString(LIGHTSMAN->GetLightsMode()) + "\n";
|
||||
|
||||
// Cabinet Lights
|
||||
i = 0;
|
||||
output = 0;
|
||||
int i = 0;
|
||||
unsigned char output = 0;
|
||||
s += "Cabinet Bits: ";
|
||||
FOREACH_CabinetLight( cl )
|
||||
{
|
||||
s += ls->m_bCabinetLights[cl] ? '1' : '0';
|
||||
if ( ls->m_bCabinetLights[cl] )
|
||||
{
|
||||
output += (unsigned char)pow((double)2,i);
|
||||
}
|
||||
i++;
|
||||
}
|
||||
s += "\n";
|
||||
@@ -60,15 +56,14 @@ void LightsDriver_LinuxParallel::Set( const LightsState *ls )
|
||||
{
|
||||
s += ssprintf("Controller%d Bits: ",gc+1);
|
||||
for( int gb=0; gb<iNumGameButtonsToShow; gb++ )
|
||||
{
|
||||
s += ls->m_bGameButtonLights[gc][gb] ? '1' : '0';
|
||||
}
|
||||
s += "\n";
|
||||
}
|
||||
s += ssprintf("Output Port: 0x%x\n", PORT_ADDRESS);
|
||||
s += ssprintf("Output Byte: %i\n", output);
|
||||
|
||||
if ( SCREEN_DEBUG ) { SCREENMAN->SystemMessageNoAnimate( s ); }
|
||||
if( SCREEN_DEBUG )
|
||||
SCREENMAN->SystemMessageNoAnimate( s );
|
||||
|
||||
// Send byte to port
|
||||
outb( output, PORT_ADDRESS );
|
||||
|
||||
Reference in New Issue
Block a user