equal
deleted
inserted
replaced
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) |