diff --git a/backup/main.lfm b/backup/main.lfm index 702f061..ea3947a 100644 --- a/backup/main.lfm +++ b/backup/main.lfm @@ -1,7 +1,7 @@ object GUIForm: TGUIForm - Left = 116 + Left = 81 Height = 668 - Top = 91 + Top = 109 Width = 1014 AlphaBlendValue = 128 Caption = 'microM8 GUI' diff --git a/backup/main.pas b/backup/main.pas index 0440ce0..f8c4816 100644 --- a/backup/main.pas +++ b/backup/main.pas @@ -1335,7 +1335,7 @@ begin odDiskImages.FilterIndex := 3; if odDiskImages.Execute then begin - LaunchPAK( odDiskImages.Filename ); + LaunchPAK( ReplaceStr( odDiskImages.Filename, '\', '/' ) ); //StatusBar1.SimpleText := odDiskImages.Filename; end; ShowM8; @@ -2159,19 +2159,13 @@ end; procedure TGUIForm.RepaintWindow; var - S: TMemoryStream; - filename: string; + S: TStringStream; + filename, json: string; begin - S := TMemoryStream.Create(); - SimpleGetStream(baseUrl + '/api/control/window/screen', S); - if S.Size > 0 then - begin - filename := GetUserDir + PathSeparator + 'microm8scrn.png'; - //StatusBar1.SimpleText:='Got '+IntToStr(S.Size)+' bytes of PNG data'; - S.SaveToFile(filename); - backdrop.Picture.LoadFromFile(filename); - S.Free; - end; + filename := GetUserDir + DirectorySeparator + 'microm8scrn.png'; + json := '{ "path": "' + ReplaceStr(filename, '\', '/') + '" }'; + SimpleFormPost(baseUrl + '/api/control/window/screen', json, S); + backdrop.Picture.LoadFromFile(filename); end; procedure TGUIForm.ReposWindow; diff --git a/backup/poc.lps b/backup/poc.lps index d864157..696c2ba 100644 --- a/backup/poc.lps +++ b/backup/poc.lps @@ -21,8 +21,8 @@ - - + + @@ -67,123 +67,123 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + diff --git a/lib/x86_64-win64/main.lfm b/lib/x86_64-win64/main.lfm index 702f061..ea3947a 100644 --- a/lib/x86_64-win64/main.lfm +++ b/lib/x86_64-win64/main.lfm @@ -1,7 +1,7 @@ object GUIForm: TGUIForm - Left = 116 + Left = 81 Height = 668 - Top = 91 + Top = 109 Width = 1014 AlphaBlendValue = 128 Caption = 'microM8 GUI' diff --git a/lib/x86_64-win64/main.o b/lib/x86_64-win64/main.o index 9f1495e..a6f1e52 100644 Binary files a/lib/x86_64-win64/main.o and b/lib/x86_64-win64/main.o differ diff --git a/lib/x86_64-win64/main.ppu b/lib/x86_64-win64/main.ppu index fd200a6..8e133e4 100644 Binary files a/lib/x86_64-win64/main.ppu and b/lib/x86_64-win64/main.ppu differ diff --git a/lib/x86_64-win64/poc.obj b/lib/x86_64-win64/poc.obj index 9520bc5..59006a5 100644 Binary files a/lib/x86_64-win64/poc.obj and b/lib/x86_64-win64/poc.obj differ diff --git a/main.lfm b/main.lfm index 702f061..ea3947a 100644 --- a/main.lfm +++ b/main.lfm @@ -1,7 +1,7 @@ object GUIForm: TGUIForm - Left = 116 + Left = 81 Height = 668 - Top = 91 + Top = 109 Width = 1014 AlphaBlendValue = 128 Caption = 'microM8 GUI' diff --git a/main.pas b/main.pas index bb810c6..ed506d1 100644 --- a/main.pas +++ b/main.pas @@ -2159,19 +2159,15 @@ end; procedure TGUIForm.RepaintWindow; var - S: TMemoryStream; - filename: string; + S: TStringStream; + filename, json: string; begin - S := TMemoryStream.Create(); - SimpleGetStream(baseUrl + '/api/control/window/screen', S); - if S.Size > 0 then - begin - filename := GetUserDir + PathSeparator + 'microm8scrn.png'; - //StatusBar1.SimpleText:='Got '+IntToStr(S.Size)+' bytes of PNG data'; - S.SaveToFile(filename); - backdrop.Picture.LoadFromFile(filename); - S.Free; - end; + backdrop.Visible := false; + filename := GetUserDir + DirectorySeparator + 'microm8scrn.png'; + json := '{ "path": "' + ReplaceStr(filename, '\', '/') + '" }'; + SimpleFormPost(baseUrl + '/api/control/window/screen', json, S); + backdrop.Picture.LoadFromFile(filename); + backdrop.Visible := true; end; procedure TGUIForm.ReposWindow; diff --git a/poc.lps b/poc.lps index 696c2ba..6a1ad5b 100644 --- a/poc.lps +++ b/poc.lps @@ -21,8 +21,8 @@ - - + + @@ -61,129 +61,129 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - +