diff options
author | Graeme Geldenhuys <graemeg@gmail.com> | 2013-04-30 22:57:09 +0200 |
---|---|---|
committer | Graeme Geldenhuys <graemeg@gmail.com> | 2013-04-30 23:09:24 +0200 |
commit | c09c7fcf5e48fee76bc53d2fd4e6d1018f6d47d4 (patch) | |
tree | a2138de45e87d03971fbacd77721eb56d2b2b674 | |
parent | 800b531ef0d818bc0a81432bf9a13eda0796389c (diff) | |
download | fpGUI-c09c7fcf5e48fee76bc53d2fd4e6d1018f6d47d4.tar.xz |
Fixes a Windows 64-bit compile error relating to Windows.SetTimer()
The TIMERPROC signature has changed between FPC 2.6.0 and 2.6.2. This
minor changes now supports both compiler versions. I tested this under
32-bit and 64-bit FPC.
-rw-r--r-- | src/corelib/gdi/fpg_gdi.pas | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/corelib/gdi/fpg_gdi.pas b/src/corelib/gdi/fpg_gdi.pas index 196e467a..513ab71a 100644 --- a/src/corelib/gdi/fpg_gdi.pas +++ b/src/corelib/gdi/fpg_gdi.pas @@ -1,7 +1,7 @@ { fpGUI - Free Pascal GUI Toolkit - Copyright (C) 2006 - 2012 See the file AUTHORS.txt, included in this + Copyright (C) 2006 - 2013 See the file AUTHORS.txt, included in this distribution, for details of the copyright. See the file COPYING.modifiedLGPL, included in this distribution, @@ -3089,7 +3089,11 @@ begin ActiveX.RevokeDragDrop(TfpgWidget(FDropTarget).WinHandle); end; -procedure TimerCallBackProc(window_hwnd : hwnd; msg : DWORD; idEvent: UINT; dwTime: DWORD); stdcall; +{$IF FPC_FULLVERSION<20602} +procedure TimerCallBackProc(hWnd: HWND; uMsg: UINT; idEvent: UINT; dwTime: DWORD); stdcall; +{$ELSE} +procedure TimerCallBackProc(hWnd: HWND; uMsg: UINT; idEvent: UINT_PTR; dwTime: DWORD); stdcall; +{$IFEND} begin { idEvent contains the handle to the timer that got triggered } fpgCheckTimers; @@ -3102,7 +3106,6 @@ begin inherited SetEnabled(AValue); if FEnabled then begin -// FHandle := Windows.SetTimer(0, 0, Interval, nil); FHandle := Windows.SetTimer(0, 0, Interval, @TimerCallBackProc); end else |