mirror of
https://github.com/FunkyFr3sh/cnc-ddraw.git
synced 2025-03-24 17:49:52 +01:00
add new resolution settings
This commit is contained in:
parent
93c6e120b6
commit
de2e3bb266
@ -738,10 +738,10 @@ void __fastcall TConfigForm::FormCreate(TObject *Sender)
|
|||||||
|
|
||||||
int cwidth = hd_ini->ReadInteger("Game", "Width", 0);
|
int cwidth = hd_ini->ReadInteger("Game", "Width", 0);
|
||||||
int cheight = hd_ini->ReadInteger("Game", "Height", 0);
|
int cheight = hd_ini->ReadInteger("Game", "Height", 0);
|
||||||
int reso = hd_ini->ReadInteger("Game", "Resolution", 3);
|
int reso = hd_ini->ReadInteger("Game", "Resolution", 4);
|
||||||
|
|
||||||
if (!cwidth || !cheight) {
|
if (!cwidth || !cheight) {
|
||||||
ResolutionCbx->ItemIndex = reso <= 7 ? reso : 3;
|
ResolutionCbx->ItemIndex = reso <= 10 ? reso : 4;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
ResolutionCbx->AddItem(IntToStr(cwidth) + "x" + IntToStr(cheight), NULL);
|
ResolutionCbx->AddItem(IntToStr(cwidth) + "x" + IntToStr(cheight), NULL);
|
||||||
@ -948,14 +948,14 @@ void TConfigForm::SaveSettings()
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ResolutionCbx->ItemIndex <= 7) {
|
if (ResolutionCbx->ItemIndex <= 10) {
|
||||||
hd_ini->WriteInteger("Game", "Resolution", ResolutionCbx->ItemIndex);
|
hd_ini->WriteInteger("Game", "Resolution", ResolutionCbx->ItemIndex);
|
||||||
|
|
||||||
hd_ini->WriteInteger("Game", "Width", 0);
|
hd_ini->WriteInteger("Game", "Width", 0);
|
||||||
hd_ini->WriteInteger("Game", "Height", 0);
|
hd_ini->WriteInteger("Game", "Height", 0);
|
||||||
|
|
||||||
if (ResolutionCbx->Items->Count == 9) {
|
if (ResolutionCbx->Items->Count == 12) {
|
||||||
ResolutionCbx->Items->Delete(8);
|
ResolutionCbx->Items->Delete(11);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3539,6 +3539,7 @@ object ConfigForm: TConfigForm
|
|||||||
BevelInner = bvNone
|
BevelInner = bvNone
|
||||||
BevelOuter = bvSpace
|
BevelOuter = bvSpace
|
||||||
Style = csDropDownList
|
Style = csDropDownList
|
||||||
|
DropDownCount = 11
|
||||||
Font.Charset = DEFAULT_CHARSET
|
Font.Charset = DEFAULT_CHARSET
|
||||||
Font.Color = clWindowText
|
Font.Color = clWindowText
|
||||||
Font.Height = -16
|
Font.Height = -16
|
||||||
@ -3548,14 +3549,17 @@ object ConfigForm: TConfigForm
|
|||||||
TabOrder = 6
|
TabOrder = 6
|
||||||
OnChange = PresentationCbxChange
|
OnChange = PresentationCbxChange
|
||||||
Items.Strings = (
|
Items.Strings = (
|
||||||
'640x480 (4:3)'
|
'640x480 (4:3)'
|
||||||
'800x608 (4:3)'
|
'800x608 (4:3)'
|
||||||
'832x480 (16:9)'
|
'1024x768 (4:3)'
|
||||||
'960x544 (16:9)'
|
'832x480 (16:9)'
|
||||||
|
'960x544 (16:9)'
|
||||||
'1280x704 (16:9)'
|
'1280x704 (16:9)'
|
||||||
|
'1120x480 (21:9)'
|
||||||
'1280x544 (21:9)'
|
'1280x544 (21:9)'
|
||||||
'768x480 (16:10)'
|
'768x480 (16:10)'
|
||||||
'960x608 (16:10)')
|
'960x608 (16:10)'
|
||||||
|
'1280x800 (16:10)')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
object MenuPnl: TPanel
|
object MenuPnl: TPanel
|
||||||
|
Loading…
x
Reference in New Issue
Block a user