Changeset 15 for trunk/Start.pas
- Timestamp:
- Jan 7, 2017, 10:16:37 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Start.pas
r14 r15 182 182 procedure TStartDlg.FormCreate(Sender: TObject); 183 183 var 184 x, y, i, ResolutionX, ResolutionY, ResolutionBPP, ResolutionFreq ,185 ScreenMode: integer;184 x, y, i, ResolutionX, ResolutionY, ResolutionBPP, ResolutionFreq: Integer; 185 ScreenMode: Integer; 186 186 DefaultAI, s: string; 187 187 r0, r1: HRgn; 188 188 Reg: TRegistry; 189 FirstStart: boolean; 189 FirstStart: Boolean; 190 Location: TPoint; 190 191 begin 191 192 Reg := TRegistry.Create; … … 237 238 begin 238 239 Reg.OpenKey('SOFTWARE\cevo\RegVer9', false); 239 try240 if Reg.ValueExists('ScreenMode') then 240 241 ScreenMode := Reg.ReadInteger('ScreenMode'); 241 FullScreen := ScreenMode > 0; 242 if Reg.ValueExists('ResolutionX') then 243 ResolutionX := Reg.ReadInteger('ResolutionX'); 244 if Reg.ValueExists('ResolutionY') then 245 ResolutionY := Reg.ReadInteger('ResolutionY'); 246 if Reg.ValueExists('ResolutionBPP') then 247 ResolutionBPP := Reg.ReadInteger('ResolutionBPP'); 248 if Reg.ValueExists('ResolutionFreq') then 249 ResolutionFreq := Reg.ReadInteger('ResolutionFreq'); 250 if ScreenMode = 2 then 251 ChangeResolution(ResolutionX, ResolutionY, ResolutionBPP, 252 ResolutionFreq); 253 except 254 end; 242 FullScreen := ScreenMode > 0; 243 if Reg.ValueExists('ResolutionX') then 244 ResolutionX := Reg.ReadInteger('ResolutionX'); 245 if Reg.ValueExists('ResolutionY') then 246 ResolutionY := Reg.ReadInteger('ResolutionY'); 247 if Reg.ValueExists('ResolutionBPP') then 248 ResolutionBPP := Reg.ReadInteger('ResolutionBPP'); 249 if Reg.ValueExists('ResolutionFreq') then 250 ResolutionFreq := Reg.ReadInteger('ResolutionFreq'); 251 if ScreenMode = 2 then 252 ChangeResolution(ResolutionX, ResolutionY, ResolutionBPP, 253 ResolutionFreq); 255 254 Reg.closekey; 256 255 end; … … 277 276 if FullScreen then 278 277 begin 279 left := (screen.width - 800) * 3 div 8; 280 top := screen.height - ClientHeight - (screen.height - 600) div 3; 278 Location := Point(Screen.Width, Screen.Height); 279 Location := Point((Screen.width - 800) * 3 div 8, 280 Screen.height - ClientHeight - (Screen.height - 600) div 3); 281 Left := Location.X; 282 Top := Location.Y; 281 283 282 284 r0 := CreateRectRgn(0, 0, ClientWidth, ClientHeight);
Note:
See TracChangeset
for help on using the changeset viewer.