fix incorrect mouse button state call

This commit is contained in:
April Ayres-Griffiths 2019-04-13 13:39:35 +10:00
parent 6806f92640
commit b4a3c7e325
4 changed files with 2 additions and 4 deletions

View File

@ -2298,10 +2298,8 @@ begin
if GetTitleOfActiveWindow = 'microM8' then
begin
{$IFDEF WINDOWS}
if IsMouseBtnDown then
exit;
{$ENDIF}
//Application.Restore;
StatusBar1.SimpleText := 'trying to focus '+DateTimeToStr(Now);

Binary file not shown.

Binary file not shown.

View File

@ -539,7 +539,7 @@ var
mstate: integer;
s: string;
begin
s := GetConfig( baseUrl+'/api/control/mouse/buttonstate' );
s := SimpleGet( baseUrl+'/api/control/mouse/buttonstate' );
mstate := StrToInt( s );
result := (mstate and integer(AMouseBtn)) <> 0;
end;
@ -560,7 +560,7 @@ function TGUIForm.IsMouseBtnDown: Boolean;
var
mstate: integer;
begin
mstate := StrToInt( GetConfig( baseUrl+'/api/control/mouse/buttonstate' ) );
mstate := StrToInt( SimpleGet( baseUrl+'/api/control/mouse/buttonstate' ) );
result := mstate <> 0;
end;
{$ENDIF}