Skip to content
Snippets Groups Projects
Commit 2a204230 authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

Extend cstatlock to cover vmem

parent 26f4a92f
No related branches found
No related tags found
No related merge requests found
...@@ -893,12 +893,10 @@ int bitmap_vmem_gettext(int sx, int sy, int ex, int ey, struct vmem_cell *fill) ...@@ -893,12 +893,10 @@ int bitmap_vmem_gettext(int sx, int sy, int ex, int ey, struct vmem_cell *fill)
pthread_mutex_lock(&vstatlock); pthread_mutex_lock(&vstatlock);
vmem_ptr = get_vmem(&vstat); vmem_ptr = get_vmem(&vstat);
pthread_mutex_unlock(&vstatlock);
for(y=sy-1;y<ey;y++) { for(y=sy-1;y<ey;y++) {
for(x=sx-1;x<ex;x++) for(x=sx-1;x<ex;x++)
memcpy(fill++, &vmem_ptr->vmem[y*cio_textinfo.screenwidth+x], sizeof(*fill)); memcpy(fill++, &vmem_ptr->vmem[y*cio_textinfo.screenwidth+x], sizeof(*fill));
} }
pthread_mutex_lock(&vstatlock);
release_vmem(vmem_ptr); release_vmem(vmem_ptr);
pthread_mutex_unlock(&vstatlock); pthread_mutex_unlock(&vstatlock);
return(1); return(1);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment