Browse Source

--- Merging r24186 into '.':
U packages/opengles/src/gles20.pas
--- Merging r25129 into '.':
U rtl/objpas/classes/stringl.inc
U rtl/objpas/classes/classesh.inc

# revisions: 24186,25129
r24186 | jonas | 2013-04-07 19:25:06 +0200 (Sun, 07 Apr 2013) | 2 lines
Changed paths:
M /trunk/packages/opengles/src/gles20.pas

* prefix calls to dynlibs routines with "dynlibs." so that under Win* the
versions from the Windows unit aren't used instead (mantis #24242)
r25129 | michael | 2013-07-19 09:16:06 +0200 (Fri, 19 Jul 2013) | 1 line
Changed paths:
M /trunk/rtl/objpas/classes/classesh.inc
M /trunk/rtl/objpas/classes/stringl.inc

* Added AddText as suggested in bug ID #24764

git-svn-id: branches/fixes_2_6@25927 -

marco 11 years ago
parent
commit
c2c73a8ad5

+ 4 - 4
packages/opengles/src/gles20.pas

@@ -1365,7 +1365,7 @@ implementation
 
 
   function glGetProcAddress(ahlib:tlibhandle;ProcName:pchar):pointer;
   function glGetProcAddress(ahlib:tlibhandle;ProcName:pchar):pointer;
     begin
     begin
-      result:=GetProcAddress(ahlib,ProcName);
+      result:=dynlibs.GetProcAddress(ahlib,ProcName);
 {$ifdef EGL}
 {$ifdef EGL}
       if assigned(eglGetProcAddress) and not assigned(result) then
       if assigned(eglGetProcAddress) and not assigned(result) then
         result:=eglGetProcAddress(ProcName);
         result:=eglGetProcAddress(ProcName);
@@ -1465,7 +1465,7 @@ implementation
   procedure LoadEGL(lib : pchar);
   procedure LoadEGL(lib : pchar);
     begin
     begin
       FreeEGL;
       FreeEGL;
-      EGLLib:=LoadLibrary(lib);
+      EGLLib:=dynlibs.LoadLibrary(lib);
       if EGLLib=0 then
       if EGLLib=0 then
         raise Exception.Create(format('Could not load library: %s',[lib]));
         raise Exception.Create(format('Could not load library: %s',[lib]));
 
 
@@ -1687,7 +1687,7 @@ implementation
   procedure LoadGLESv2(lib : pchar);
   procedure LoadGLESv2(lib : pchar);
     begin
     begin
       FreeGLESv2;
       FreeGLESv2;
-      GLESv2Lib:=LoadLibrary(lib);
+      GLESv2Lib:=dynlibs.LoadLibrary(lib);
       if GLESv2Lib=0 then
       if GLESv2Lib=0 then
         raise Exception.Create(format('Could not load library: %s',[lib]));
         raise Exception.Create(format('Could not load library: %s',[lib]));
 
 
@@ -1872,4 +1872,4 @@ finalization
 {$ifdef EGL}
 {$ifdef EGL}
   FreeEGL;
   FreeEGL;
 {$endif}
 {$endif}
-end.
+end.

+ 2 - 0
rtl/objpas/classes/classesh.inc

@@ -624,6 +624,7 @@ type
     procedure SetQuoteChar(c:Char);
     procedure SetQuoteChar(c:Char);
     procedure SetNameValueSeparator(c:Char);
     procedure SetNameValueSeparator(c:Char);
     procedure WriteData(Writer: TWriter);
     procedure WriteData(Writer: TWriter);
+    procedure DoSetTextStr(const Value: string; DoClear : Boolean);
   protected
   protected
     procedure DefineProperties(Filer: TFiler); override;
     procedure DefineProperties(Filer: TFiler); override;
     procedure Error(const Msg: string; Data: Integer);
     procedure Error(const Msg: string; Data: Integer);
@@ -652,6 +653,7 @@ type
     procedure Append(const S: string);
     procedure Append(const S: string);
     procedure AddStrings(TheStrings: TStrings); overload; virtual;
     procedure AddStrings(TheStrings: TStrings); overload; virtual;
     procedure AddStrings(const TheStrings: array of string); overload; virtual;
     procedure AddStrings(const TheStrings: array of string); overload; virtual;
+    Procedure AddText(Const S : String); virtual;
     procedure Assign(Source: TPersistent); override;
     procedure Assign(Source: TPersistent); override;
     procedure BeginUpdate;
     procedure BeginUpdate;
     procedure Clear; virtual; abstract;
     procedure Clear; virtual; abstract;

+ 13 - 2
rtl/objpas/classes/stringl.inc

@@ -557,7 +557,7 @@ begin
   Result:=True;
   Result:=True;
 end;
 end;
 
 
-Procedure TStrings.SetTextStr(const Value: string);
+Procedure TStrings.DoSetTextStr(const Value: string; DoClear : Boolean);
 
 
 Var
 Var
   S : String;
   S : String;
@@ -566,7 +566,8 @@ Var
 begin
 begin
   Try
   Try
     beginUpdate;
     beginUpdate;
-    Clear;
+    if DoClear then
+      Clear;
     P:=1;
     P:=1;
     While GetNextLine (Value,S,P) do
     While GetNextLine (Value,S,P) do
       Add(S);
       Add(S);
@@ -575,7 +576,17 @@ begin
   end;
   end;
 end;
 end;
 
 
+Procedure TStrings.SetTextStr(const Value: string);
 
 
+begin
+  DoSetTextStr(Value,True);
+end;
+
+Procedure TStrings.AddText(const S: string);
+
+begin
+  DoSetTextStr(S,False);
+end;
 
 
 Procedure TStrings.SetUpdateState(Updating: Boolean);
 Procedure TStrings.SetUpdateState(Updating: Boolean);