Commit cc87eb20 authored by Gerhard Stein's avatar Gerhard Stein

Texture improvements

parent 57b4598d
......@@ -234,7 +234,9 @@ void VirtualKeenControl::render(GsWeakSurface &sfc)
auto addTexture = [](TouchButton &button) -> void
{
if(!button.invisible)
if(!button.invisible &&
button.w > 0.0f &&
button.h > 0.0f)
{
gVideoDriver.addTextureRefToRender(button.mTexture, button.Rect());
}
......
......@@ -15,7 +15,9 @@
CAudioResources::CAudioResources()
{}
bool CAudioResources::readISFintoWaveForm( CSoundSlot &soundslot, const byte *imfdata, const Uint8 formatsize )
bool CAudioResources::readISFintoWaveForm( CSoundSlot &soundslot,
const byte *imfdata,
const Uint8 formatsize )
{
byte *imfdata_ptr = (byte*)imfdata;
const longword size = READLONGWORD(imfdata_ptr);
......
......@@ -1318,20 +1318,22 @@ void Chip__GenerateBlock2(Chip *self, Bitu total, Bit32s* output )
while ( total > 0 )
{
Channel *ch;
Channel *ch;
Bit32u samples = Chip__ForwardLFO( self, total );
for ( ch = self->chan; ch < self->chan + 9; )
{
ch = (ch->synthHandler)( ch, self, samples, output );
}
total -= samples;
output += samples;
Bit32u samples = Chip__ForwardLFO( self, total );
for ( ch = self->chan; ch < self->chan + 9; )
{
ch = (ch->synthHandler)( ch, self, samples, output );
}
total -= samples;
output += samples;
}
}
void Chip__GenerateBlock3(Chip *self, Bitu total, Bit32s* output )
{
memset(output, 0, sizeof(Bit32s) * total);
while ( total > 0 )
{
Bit32u samples = Chip__ForwardLFO( self, total );
......
......@@ -75,7 +75,7 @@ public:
*/
inline void Chip__GenerateBlock2(const Bitu total, Bit32s* output )
{
::Chip__GenerateBlock2( &m_opl_chip, total, output );
::Chip__GenerateBlock2( &m_opl_chip, total, output );
}
/**
......
......@@ -189,5 +189,6 @@ void DBOPL_InitTables( void );
void Chip__Chip(Chip *self);
void Chip__WriteReg(Chip *self, Bit32u reg, Bit8u val );
void Chip__GenerateBlock2(Chip *self, Bitu total, Bit32s* output );
void Chip__GenerateBlock3(Chip *self, Bitu total, Bit32s* output );
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment