1
0
mirror of https://github.com/salvadordf/CEF4Delphi.git synced 2025-06-22 22:17:48 +02:00

Always set the $MINENUMSIZE directive

Fix for #139 when using external message pump
This commit is contained in:
Salvador Díaz Fau
2018-11-22 15:02:21 +01:00
parent 7e7f0cbe8f
commit 18135e907a
133 changed files with 282 additions and 540 deletions

View File

@ -37,10 +37,8 @@
unit uFMXWorkScheduler;
{$IFNDEF CPUX64}
{$ALIGN ON}
{$MINENUMSIZE 4}
{$ENDIF}
{$IFNDEF CPUX64}{$ALIGN ON}{$ENDIF}
{$MINENUMSIZE 4}
{$I cef.inc}
@ -222,8 +220,12 @@ begin
{$IFDEF DELPHI17_UP}
TempHandle := ApplicationHWND;
{$ELSE}
TempHandle := FmxHandleToHWND(Application.MainForm.Handle);
if (Application <> nil) and (Application.MainForm <> nil) then
TempHandle := FmxHandleToHWND(Application.MainForm.Handle)
else
TempHandle := 0;
{$ENDIF}
if (TempHandle <> 0) then
WinApi.Windows.PostMessage(TempHandle, CEF_PUMPHAVEWORK, 0, LPARAM(delay_ms));
{$ENDIF}