1
0
mirror of https://github.com/FunkyFr3sh/cnc-ddraw.git synced 2025-03-24 17:49:52 +01:00

adjust ini file name and settings

This commit is contained in:
FunkyFr3sh 2024-01-17 23:00:08 +01:00
parent 02d300c519
commit 88e9566ccf
2 changed files with 29 additions and 36 deletions

View File

@ -702,7 +702,7 @@ void __fastcall TConfigForm::FormCreate(TObject *Sender)
} }
auto *ini = new TIniFile(".\\dd-hd.ini"); auto *ini = new TIniFile(".\\dd-hd.ini");
auto *hd_ini = new TIniFile(".\\Warcraft_II_HD.ini"); auto *hd_ini = new TIniFile(".\\Warcraft II BNE.ini");
if (ini->ReadString("ddraw", "configtheme", "Windows10") == "Cobalt XEMedia") { if (ini->ReadString("ddraw", "configtheme", "Windows10") == "Cobalt XEMedia") {
@ -736,9 +736,9 @@ void __fastcall TConfigForm::FormCreate(TObject *Sender)
PresentationCbx->ItemIndex = 0; PresentationCbx->ItemIndex = 0;
} }
int cwidth = hd_ini->ReadInteger("Warcraft_II_HD", "Width", 0); int cwidth = hd_ini->ReadInteger("Game", "Width", 0);
int cheight = hd_ini->ReadInteger("Warcraft_II_HD", "Height", 0); int cheight = hd_ini->ReadInteger("Game", "Height", 0);
int reso = hd_ini->ReadInteger("Warcraft_II_HD", "Resolution", 3); int reso = hd_ini->ReadInteger("Game", "Resolution", 3);
if (!cwidth || !cheight) { if (!cwidth || !cheight) {
ResolutionCbx->ItemIndex = reso <= 5 ? reso : 3; ResolutionCbx->ItemIndex = reso <= 5 ? reso : 3;
@ -921,7 +921,7 @@ void TConfigForm::SaveSettings()
return; return;
auto *ini = new TIniFile(".\\dd-hd.ini"); auto *ini = new TIniFile(".\\dd-hd.ini");
auto *hd_ini = new TIniFile(".\\Warcraft_II_HD.ini"); auto *hd_ini = new TIniFile(".\\Warcraft II BNE.ini");
/* Display Settings */ /* Display Settings */
@ -949,11 +949,10 @@ void TConfigForm::SaveSettings()
} }
if (ResolutionCbx->ItemIndex <= 5) { if (ResolutionCbx->ItemIndex <= 5) {
hd_ini->WriteInteger( hd_ini->WriteInteger("Game", "Resolution", ResolutionCbx->ItemIndex);
"Warcraft_II_HD", "Resolution", ResolutionCbx->ItemIndex);
hd_ini->WriteInteger("Warcraft_II_HD", "Width", 0); hd_ini->WriteInteger("Game", "Width", 0);
hd_ini->WriteInteger("Warcraft_II_HD", "Height", 0); hd_ini->WriteInteger("Game", "Height", 0);
if (ResolutionCbx->Items->Count == 7) { if (ResolutionCbx->Items->Count == 7) {
ResolutionCbx->Items->Delete(6); ResolutionCbx->Items->Delete(6);

View File

@ -4,8 +4,8 @@ object ConfigForm: TConfigForm
BorderIcons = [biSystemMenu, biMinimize] BorderIcons = [biSystemMenu, biMinimize]
BorderStyle = bsSingle BorderStyle = bsSingle
Caption = 'cnc-ddraw config' Caption = 'cnc-ddraw config'
ClientHeight = 476 ClientHeight = 475
ClientWidth = 741 ClientWidth = 737
Color = clMenu Color = clMenu
Font.Charset = DEFAULT_CHARSET Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText Font.Color = clWindowText
@ -2681,14 +2681,14 @@ object ConfigForm: TConfigForm
OnActivate = FormActivate OnActivate = FormActivate
OnCreate = FormCreate OnCreate = FormCreate
DesignSize = ( DesignSize = (
741 737
476) 475)
TextHeight = 13 TextHeight = 13
object DisplayPnl: TPanel object DisplayPnl: TPanel
Left = 233 Left = 233
Top = 8 Top = 8
Width = 499 Width = 495
Height = 465 Height = 464
Anchors = [akLeft, akTop, akRight, akBottom] Anchors = [akLeft, akTop, akRight, akBottom]
BevelOuter = bvNone BevelOuter = bvNone
Color = clWhite Color = clWhite
@ -2697,8 +2697,8 @@ object ConfigForm: TConfigForm
TabOrder = 1 TabOrder = 1
StyleElements = [seFont, seBorder] StyleElements = [seFont, seBorder]
DesignSize = ( DesignSize = (
499 495
465) 464)
object PresentationLbl: TLabel object PresentationLbl: TLabel
Left = 40 Left = 40
Top = 28 Top = 28
@ -2776,7 +2776,7 @@ object ConfigForm: TConfigForm
OnPaint = PboxPaint OnPaint = PboxPaint
end end
object LanguageImg: TImage object LanguageImg: TImage
Left = 453 Left = 449
Top = 8 Top = 8
Width = 16 Width = 16
Height = 11 Height = 11
@ -2803,6 +2803,7 @@ object ConfigForm: TConfigForm
Stretch = True Stretch = True
Visible = False Visible = False
OnClick = LanguageImgClick OnClick = LanguageImgClick
ExplicitLeft = 453
end end
object ResolutionLbl: TLabel object ResolutionLbl: TLabel
Left = 40 Left = 40
@ -2884,7 +2885,7 @@ object ConfigForm: TConfigForm
OnClick = DevmodeChkClick OnClick = DevmodeChkClick
end end
object ThemePnl: TPanel object ThemePnl: TPanel
Left = 475 Left = 471
Top = 8 Top = 8
Width = 16 Width = 16
Height = 11 Height = 11
@ -2895,7 +2896,6 @@ object ConfigForm: TConfigForm
TabOrder = 5 TabOrder = 5
StyleElements = [seFont, seBorder] StyleElements = [seFont, seBorder]
OnClick = ThemePnlClick OnClick = ThemePnlClick
ExplicitLeft = 471
end end
object ResolutionCbx: TComboBox object ResolutionCbx: TComboBox
Left = 41 Left = 41
@ -2926,8 +2926,8 @@ object ConfigForm: TConfigForm
object CompatibilityPnl: TPanel object CompatibilityPnl: TPanel
Left = 233 Left = 233
Top = 8 Top = 8
Width = 499 Width = 495
Height = 465 Height = 464
Anchors = [akLeft, akTop, akRight, akBottom] Anchors = [akLeft, akTop, akRight, akBottom]
BevelOuter = bvNone BevelOuter = bvNone
Color = clWhite Color = clWhite
@ -2936,8 +2936,6 @@ object ConfigForm: TConfigForm
TabOrder = 3 TabOrder = 3
Visible = False Visible = False
StyleElements = [seFont, seBorder] StyleElements = [seFont, seBorder]
ExplicitWidth = 495
ExplicitHeight = 464
object MaxgameticksLbl: TLabel object MaxgameticksLbl: TLabel
Left = 40 Left = 40
Top = 28 Top = 28
@ -3108,8 +3106,8 @@ object ConfigForm: TConfigForm
object AdvancedPnl: TPanel object AdvancedPnl: TPanel
Left = 233 Left = 233
Top = 8 Top = 8
Width = 499 Width = 495
Height = 465 Height = 464
Anchors = [akLeft, akTop, akRight, akBottom] Anchors = [akLeft, akTop, akRight, akBottom]
BevelOuter = bvNone BevelOuter = bvNone
Color = clWhite Color = clWhite
@ -3118,8 +3116,6 @@ object ConfigForm: TConfigForm
TabOrder = 2 TabOrder = 2
Visible = False Visible = False
StyleElements = [seFont, seBorder] StyleElements = [seFont, seBorder]
ExplicitWidth = 495
ExplicitHeight = 464
object RendererLbl: TLabel object RendererLbl: TLabel
Left = 40 Left = 40
Top = 28 Top = 28
@ -3324,8 +3320,8 @@ object ConfigForm: TConfigForm
object HotkeyPnl: TPanel object HotkeyPnl: TPanel
Left = 233 Left = 233
Top = 8 Top = 8
Width = 499 Width = 495
Height = 465 Height = 464
Anchors = [akLeft, akTop, akRight, akBottom] Anchors = [akLeft, akTop, akRight, akBottom]
BevelOuter = bvNone BevelOuter = bvNone
Color = clWhite Color = clWhite
@ -3334,8 +3330,6 @@ object ConfigForm: TConfigForm
TabOrder = 4 TabOrder = 4
Visible = False Visible = False
StyleElements = [seFont, seBorder] StyleElements = [seFont, seBorder]
ExplicitWidth = 495
ExplicitHeight = 464
object ToggleWindowedLbl: TLabel object ToggleWindowedLbl: TLabel
Left = 40 Left = 40
Top = 27 Top = 27
@ -3557,16 +3551,15 @@ object ConfigForm: TConfigForm
Left = 0 Left = 0
Top = 8 Top = 8
Width = 233 Width = 233
Height = 468 Height = 467
Anchors = [akLeft, akTop, akBottom] Anchors = [akLeft, akTop, akBottom]
BevelOuter = bvNone BevelOuter = bvNone
Color = clMenu Color = clMenu
ParentBackground = False ParentBackground = False
TabOrder = 0 TabOrder = 0
ExplicitHeight = 467
DesignSize = ( DesignSize = (
233 233
468) 467)
object DisplayBtn: TSpeedButton object DisplayBtn: TSpeedButton
Left = 0 Left = 0
Top = 8 Top = 8
@ -3633,7 +3626,7 @@ object ConfigForm: TConfigForm
end end
object RestoreDefaultsBtn: TSpeedButton object RestoreDefaultsBtn: TSpeedButton
Left = 0 Left = 0
Top = 440 Top = 439
Width = 227 Width = 227
Height = 22 Height = 22
Anchors = [akLeft, akRight, akBottom] Anchors = [akLeft, akRight, akBottom]
@ -3646,6 +3639,7 @@ object ConfigForm: TConfigForm
Font.Style = [] Font.Style = []
ParentFont = False ParentFont = False
OnClick = RestoreDefaultsBtnClick OnClick = RestoreDefaultsBtnClick
ExplicitTop = 440
end end
end end
end end