Changeset 17 for trunk/Platform/Base
- Timestamp:
- Jan 21, 2018, 10:01:14 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Platform/Base/UPlatformBase.pas
r14 r17 64 64 FOnRedraw: TNotifyEvent; 65 65 procedure DoRedraw; 66 protected 67 procedure SetVideoMode(Mode: TVideoMode); override; 66 68 public 67 69 VideoMemory: PByte; 68 VideoMemorySize: TPoint;69 70 DPI: Integer; 70 71 Canvas: TCanvas; 71 VideoMode: TVideoMode;72 procedure SetMode(Mode: TVideoMode); override;73 72 procedure GetSupportedModes(Modes: TObjectList); override; 74 73 function GetVideoMemory: PByte; override; … … 89 88 end; 90 89 91 procedure TDeviceVideoBase.Set Mode(Mode: TVideoMode);90 procedure TDeviceVideoBase.SetVideoMode(Mode: TVideoMode); 92 91 begin 93 92 if (VideoMode.Size.X <> Mode.Size.X) or … … 96 95 VideoMode.Size := Mode.Size; 97 96 VideoMode.ColorFormat := Mode.ColorFormat; 97 ReAllocMem(VideoMemory, VideoMode.GetBytesPerImage); 98 FillDWord(VideoMemory^, VideoMode.GetBytesPerImage div 4, $ffffff); 98 99 if Assigned(FOnModeChanged) then 99 100 FOnModeChanged(Self); … … 135 136 function TDeviceVideoBase.GetVideoMemory: PByte; 136 137 begin 137 VideoMemory := GetMem(VideoMode.GetBytesPerImage);138 FillDWord(VideoMemory^, VideoMode.GetBytesPerImage div 4, $ffffff);139 138 Result := VideoMemory; 140 139 end; … … 148 147 begin 149 148 inherited Create; 150 VideoMode := TVideoMode.Create;151 149 end; 152 150
Note:
See TracChangeset
for help on using the changeset viewer.