mirror of
https://github.com/FunkyFr3sh/cnc-ddraw.git
synced 2025-03-15 06:04:49 +01:00
Fix crash race condition in OpenGL renderer
This commit is contained in:
parent
2cb9affe28
commit
7a3086a3df
@ -145,11 +145,14 @@ DWORD WINAPI render_opengl_main(IDirectDrawSurfaceImpl *surface)
|
||||
}
|
||||
|
||||
/* convert ddraw surface to opengl texture */
|
||||
for(i=0; i<surface->height; i++)
|
||||
if(surface->palette)
|
||||
{
|
||||
for(j=0; j<surface->width; j++)
|
||||
for(i=0; i<surface->height; i++)
|
||||
{
|
||||
tex[i*surface->width+j] = surface->palette->data_bgr[((unsigned char *)surface->surface)[i*surface->lPitch + j*surface->lXPitch]];
|
||||
for(j=0; j<surface->width; j++)
|
||||
{
|
||||
tex[i*surface->width+j] = surface->palette->data_bgr[((unsigned char *)surface->surface)[i*surface->lPitch + j*surface->lXPitch]];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user