Changeset 19 for trunk/Platform/Base
- Timestamp:
- Jan 21, 2018, 11:33:15 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Platform/Base/UPlatformBase.pas
r18 r19 93 93 (VideoMode.Size.Y <> Mode.Size.Y) or 94 94 (VideoMode.ColorFormat <> Mode.ColorFormat) then begin 95 VideoMode.Size := Mode.Size; 96 VideoMode.ColorFormat := Mode.ColorFormat; 97 ReAllocMem(VideoMemory, VideoMode.GetBytesPerImage); 98 FillDWord(VideoMemory^, VideoMode.GetBytesPerImage div 4, $ffffff); 95 Lock.Acquire; 96 try 97 if Mode.GetBytesPerImage <> VideoMode.GetBytesPerImage then begin 98 ReAllocMem(VideoMemory, Mode.GetBytesPerImage); 99 FillDWord(VideoMemory^, Mode.GetBytesPerImage div 4, $ffffff); 100 end; 101 VideoMode.Size := Mode.Size; 102 VideoMode.ColorFormat := Mode.ColorFormat; 103 finally 104 Lock.Release; 105 end; 99 106 if Assigned(FOnModeChanged) then 100 107 FOnModeChanged(Self); … … 151 158 destructor TDeviceVideoBase.Destroy; 152 159 begin 153 VideoMode.Free;154 160 inherited Destroy; 155 161 end;
Note:
See TracChangeset
for help on using the changeset viewer.