mirror of
https://github.com/moparisthebest/Simba
synced 2024-11-29 04:22:16 -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
|
Input/Output manager for Mufasa Macro Library
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{$mode objfpc}{$H+}
|
||||||
unit IOManager;
|
unit IOManager;
|
||||||
|
|
||||||
interface
|
interface
|
||||||
@ -370,7 +371,7 @@ implementation
|
|||||||
procedure TIOManager_Abstract.KeyUp(key: Word); begin keymouse.ReleaseKey(key) end;
|
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.KeyDown(key: Word); begin keymouse.HoldKey(key) end;
|
||||||
procedure TIOManager_Abstract.PressKey(key: Word); begin keyup(key); keydown(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;
|
function TIOManager_Abstract.isKeyDown(key: Word): Boolean; begin result:= keymouse.IsKeyHeld(key); end;
|
||||||
|
|
||||||
//***implementation*** TTarget
|
//***implementation*** TTarget
|
||||||
@ -479,7 +480,7 @@ implementation
|
|||||||
procedure TEIOS_Target.SendString(str: string);
|
procedure TEIOS_Target.SendString(str: string);
|
||||||
begin
|
begin
|
||||||
if Pointer(client.SendString) <> nil then
|
if Pointer(client.SendString) <> nil then
|
||||||
client.SendString(target,PChar(@str[1]))
|
client.SendString(target,PChar(str))
|
||||||
else
|
else
|
||||||
inherited SendString(str);
|
inherited SendString(str);
|
||||||
end;
|
end;
|
||||||
|
@ -132,7 +132,7 @@ implementation
|
|||||||
SetLength(Loaded,PluginLen + 1);
|
SetLength(Loaded,PluginLen + 1);
|
||||||
Writeln(Format('Loading plugin %s at %s',[PluginName,PluginDirs.Strings[ii]]));
|
Writeln(Format('Loading plugin %s at %s',[PluginName,PluginDirs.Strings[ii]]));
|
||||||
Loaded[PluginLen].filename:= PluginDirs.Strings[ii] + Pluginname + PlugExt;
|
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
|
if Loaded[PluginLen].handle = 0 then
|
||||||
Raise Exception.CreateFMT('Error loading plugin %s',[Loaded[PluginLen].filename]);
|
Raise Exception.CreateFMT('Error loading plugin %s',[Loaded[PluginLen].filename]);
|
||||||
if InitPlugin(Loaded[PluginLen].handle) then
|
if InitPlugin(Loaded[PluginLen].handle) then
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
Linux OS specific implemetation for Mufasa Macro Library
|
Linux OS specific implemetation for Mufasa Macro Library
|
||||||
}
|
}
|
||||||
|
{$mode objfpc}{$H+}
|
||||||
unit os_linux;
|
unit os_linux;
|
||||||
|
|
||||||
interface
|
interface
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
Windows OS specific implementation for Mufasa Macro Library
|
Windows OS specific implementation for Mufasa Macro Library
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{$mode objfpc}{$H+}
|
||||||
unit os_windows;
|
unit os_windows;
|
||||||
|
|
||||||
interface
|
interface
|
||||||
|
Loading…
Reference in New Issue
Block a user