mirror of
https://github.com/moparisthebest/Simba
synced 2024-11-25 18:52:15 -05:00
Added compiler directives for Ansi-string, fixed use of PChar to behave accordingly.
git-svn-id: http://www.villavu.com/repositories/merlijn/mufasa@450 3f818213-9676-44b0-a9b4-5e4c4e03d09d
This commit is contained in:
parent
bbd9f73942
commit
798444e4fd
@ -21,6 +21,7 @@
|
||||
Input/Output manager for Mufasa Macro Library
|
||||
}
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
unit IOManager;
|
||||
|
||||
interface
|
||||
@ -370,7 +371,7 @@ implementation
|
||||
procedure TIOManager_Abstract.KeyUp(key: Word); begin keymouse.ReleaseKey(key) end;
|
||||
procedure TIOManager_Abstract.KeyDown(key: Word); begin keymouse.HoldKey(key) end;
|
||||
procedure TIOManager_Abstract.PressKey(key: Word); begin keyup(key); keydown(key); end;
|
||||
procedure TIOManager_Abstract.SendText(text: string); begin keymouse.SendString(PChar(@text[1])); end;
|
||||
procedure TIOManager_Abstract.SendText(text: string); begin keymouse.SendString(text); end;
|
||||
function TIOManager_Abstract.isKeyDown(key: Word): Boolean; begin result:= keymouse.IsKeyHeld(key); end;
|
||||
|
||||
//***implementation*** TTarget
|
||||
@ -479,7 +480,7 @@ implementation
|
||||
procedure TEIOS_Target.SendString(str: string);
|
||||
begin
|
||||
if Pointer(client.SendString) <> nil then
|
||||
client.SendString(target,PChar(@str[1]))
|
||||
client.SendString(target,PChar(str))
|
||||
else
|
||||
inherited SendString(str);
|
||||
end;
|
||||
|
@ -132,7 +132,7 @@ implementation
|
||||
SetLength(Loaded,PluginLen + 1);
|
||||
Writeln(Format('Loading plugin %s at %s',[PluginName,PluginDirs.Strings[ii]]));
|
||||
Loaded[PluginLen].filename:= PluginDirs.Strings[ii] + Pluginname + PlugExt;
|
||||
Loaded[PluginLen].handle:= LoadLibrary(PChar(@Loaded[PluginLen].filename[1]));
|
||||
Loaded[PluginLen].handle:= LoadLibrary(Loaded[PluginLen].filename);
|
||||
if Loaded[PluginLen].handle = 0 then
|
||||
Raise Exception.CreateFMT('Error loading plugin %s',[Loaded[PluginLen].filename]);
|
||||
if InitPlugin(Loaded[PluginLen].handle) then
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
Linux OS specific implemetation for Mufasa Macro Library
|
||||
}
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
unit os_linux;
|
||||
|
||||
interface
|
||||
|
@ -21,6 +21,7 @@
|
||||
Windows OS specific implementation for Mufasa Macro Library
|
||||
}
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
unit os_windows;
|
||||
|
||||
interface
|
||||
|
Loading…
Reference in New Issue
Block a user