hedgewars/uFLIPC.pas
branchqmlfrontend
changeset 11418 091149424aa4
parent 11403 b894922d58cc
child 11450 0c75fa9ce340
equal deleted inserted replaced
11417:4815e406a760 11418:091149424aa4
    51 begin
    51 begin
    52     SDL_LockMutex(mut);
    52     SDL_LockMutex(mut);
    53     while (msg.str[0] = #0) and (msg.buf = nil) do
    53     while (msg.str[0] = #0) and (msg.buf = nil) do
    54         SDL_CondWait(cond, mut);
    54         SDL_CondWait(cond, mut);
    55 
    55 
    56     if msg.buf <> nil then
    56     if msg.buf <> nil then 
       
    57 // FIXME is this copying really needed, the buffer is in another thread already anyway?
    57     begin
    58     begin
    58         tmp:= msg.buf;
    59         tmp:= msg.buf;
    59         msg.buf:= GetMem(msg.len);
    60         msg.buf:= GetMem(msg.len);
    60         Move(tmp^, msg.buf^, msg.len);
    61         Move(tmp^, msg.buf^, msg.len);
    61         FreeMem(tmp, msg.len)
    62         FreeMem(tmp, msg.len)