diff --git a/src/sound/music_midistream.cpp b/src/sound/music_midistream.cpp index 8c312f4c1..7fb46160f 100644 --- a/src/sound/music_midistream.cpp +++ b/src/sound/music_midistream.cpp @@ -962,7 +962,7 @@ int MIDIStreamer::FillBuffer(int buffer_num, int max_events, DWORD max_time) int MIDIStreamer::FillStopBuffer(int buffer_num) { - DWORD *events = Events[buffer_num], *max_event_p; + DWORD *events = Events[buffer_num]; int i; events = WriteStopNotes(events); diff --git a/src/win32/fb_d3d9.cpp b/src/win32/fb_d3d9.cpp index c7515bb26..25716a0f0 100644 --- a/src/win32/fb_d3d9.cpp +++ b/src/win32/fb_d3d9.cpp @@ -2981,15 +2981,6 @@ void STACK_ARGS D3DFB::DrawTextureV (FTexture *img, double x, double y, uint32 t x1 -= (parms.texwidth - parms.windowright) * xscale; u1 = float(u1 - (parms.texwidth - parms.windowright) * uscale); } - parms.bilinear = false; - - D3DCOLOR color0, color1; - BufferedTris *quad = &QuadExtra[QuadBatchPos]; - - if (!SetStyle(tex, parms, color0, color1, *quad)) - { - return; - } #if 0 float vscale = 1.f / tex->Box->Owner->Height / yscale; @@ -3033,6 +3024,16 @@ void STACK_ARGS D3DFB::DrawTextureV (FTexture *img, double x, double y, uint32 t D3DDevice->SetRenderState(D3DRS_SCISSORTESTENABLE, TRUE); } #endif + parms.bilinear = false; + + D3DCOLOR color0, color1; + BufferedTris *quad = &QuadExtra[QuadBatchPos]; + + if (!SetStyle(tex, parms, color0, color1, *quad)) + { + goto done; + } + quad->Texture = tex->Box->Owner->Tex; if (parms.bilinear) { @@ -3109,7 +3110,7 @@ void STACK_ARGS D3DFB::DrawTextureV (FTexture *img, double x, double y, uint32 t QuadBatchPos++; VertexPos += 4; IndexPos += 6; - +done: if (scissoring) { EndQuadBatch();