From 5250f2f9d149177fb949a734726d59f49317c3b6 Mon Sep 17 00:00:00 2001 From: Graeme Geldenhuys Date: Tue, 11 Mar 2014 16:15:30 +0000 Subject: Removes WriteLn() statement in GDI backend Us SendDebug() instead - which means it will not cause a problem on Windows non-console applications. --- src/corelib/gdi/fpg_gdi.pas | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/corelib') diff --git a/src/corelib/gdi/fpg_gdi.pas b/src/corelib/gdi/fpg_gdi.pas index 93d3a9ed..f1372928 100644 --- a/src/corelib/gdi/fpg_gdi.pas +++ b/src/corelib/gdi/fpg_gdi.pas @@ -2255,8 +2255,10 @@ var c: longword; begin c := Windows.GetPixel(FWinGC, X, Y); + {$IFDEF DEBUG} if c = CLR_INVALID then - Writeln('fpGFX/GDI: TfpgGDICanvas.GetPixel returned an invalid color'); + SendDebug('fpGFX/GDI: TfpgGDICanvas.GetPixel returned an invalid color'); + {$ENDIF} Result := WinColorTofpgColor(c); end; @@ -2972,7 +2974,7 @@ end; destructor TfpgGDIDrag.Destroy; begin {$IFDEF DND_DEBUG} - writeln('TfpgGDIDrag.Destroy '); + SendDebug('TfpgGDIDrag.Destroy '); {$ENDIF} inherited Destroy; end; @@ -2994,14 +2996,14 @@ begin if FDragging then begin {$IFDEF DND_DEBUG} - writeln('TfpgGDIDrag.Execute (already dragging)'); + SendDebug('TfpgGDIDrag.Execute (already dragging)'); {$ENDIF} Result := daIgnore; end else begin {$IFDEF DND_DEBUG} - writeln('TfpgGDIDrag.Execute (new drag)'); + SendDebug('TfpgGDIDrag.Execute (new drag)'); {$ENDIF} FDragging := True; wapplication.Drag := self; @@ -3016,7 +3018,7 @@ begin {$Note OLE DND: We are only handling strings at the moment, this needs to be extended to other types too } itm := FMimeData[i]; {$IFDEF DND_DEBUG} - writeln(' Processing mime-type: ', itm.Format); + SendDebug(' Processing mime-type: ', itm.Format); {$ENDIF} { description of data we are sending } -- cgit v1.2.3-70-g09d2