hedgewars/uFLIPC.pas
branchqmlfrontend
changeset 10428 7c25297720f1
parent 10426 727a154cf784
child 10898 f373838129c2
--- a/hedgewars/uFLIPC.pas	Sun Sep 28 00:18:01 2014 +0400
+++ b/hedgewars/uFLIPC.pas	Sun Sep 28 00:49:04 2014 +0400
@@ -9,7 +9,7 @@
 procedure initIPC;
 procedure freeIPC;
 
-procedure ipcToEngine(p: PChar; len: byte); cdecl; export;
+procedure ipcToEngine(s: shortstring);
 //function  ipcReadFromEngine: shortstring;
 //function  ipcCheckFromEngine: boolean;
 
@@ -18,7 +18,7 @@
 function ipcReadFromFrontend: shortstring;
 function ipcCheckFromFrontend: boolean;
 
-procedure registerPreviewCallback(p: pointer; f: TIPCCallback); cdecl; export;
+procedure registerIPCCallback(p: pointer; f: TIPCCallback);
 
 implementation
 
@@ -69,12 +69,10 @@
     SDL_UnlockMutex(mut)
 end;
 
-procedure ipcToEngine(p: PChar; len: byte); cdecl; export;
+procedure ipcToEngine(s: shortstring);
 var msg: TIPCMessage;
 begin
-    writeln(stderr, len);
-    Move(p^, msg.str[1], len);
-    msg.str[0]:= char(len);
+    msg.str:= s;
     msg.buf:= nil;
     ipcSend(msg, msgEngine, mutEngine, condEngine)
 end;
@@ -133,7 +131,7 @@
     until false
 end;
 
-procedure registerPreviewCallback(p: pointer; f: TIPCCallback); cdecl; export;
+procedure registerIPCCallback(p: pointer; f: TIPCCallback);
 begin
     callbackPointer:= p;
     callbackFunction:= f;