You've already forked CEF4Delphi
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:
@ -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}
|
||||
|
Reference in New Issue
Block a user