Changeset 4


Ignore:
Timestamp:
Jan 7, 2017, 11:14:34 AM (8 years ago)
Author:
chronos
Message:
  • Fixed: Read registry keys only if they exist.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Start.pas

    r2 r4  
    238238    ScreenMode:=Reg.ReadInteger('ScreenMode');
    239239    FullScreen:= ScreenMode>0;
    240     ResolutionX:=Reg.ReadInteger('ResolutionX');
    241     ResolutionY:=Reg.ReadInteger('ResolutionY');
    242     ResolutionBPP:=Reg.ReadInteger('ResolutionBPP');
    243     ResolutionFreq:=Reg.ReadInteger('ResolutionFreq');
     240    if Reg.ValueExists('ResolutionX') then
     241      ResolutionX:=Reg.ReadInteger('ResolutionX');
     242    if Reg.ValueExists('ResolutionY') then
     243        ResolutionY:=Reg.ReadInteger('ResolutionY');
     244    if Reg.ValueExists('ResolutionBPP') then
     245        ResolutionBPP:=Reg.ReadInteger('ResolutionBPP');
     246    if Reg.ValueExists('ResolutionFreq') then
     247        ResolutionFreq:=Reg.ReadInteger('ResolutionFreq');
    244248    if ScreenMode=2 then
    245249      ChangeResolution(ResolutionX,ResolutionY,ResolutionBPP,ResolutionFreq);
Note: See TracChangeset for help on using the changeset viewer.