Skip to content

Commit 33535b4

Browse files
committed
Merge branch 'develop' into pr/916
2 parents b69c969 + 9d2c1a6 commit 33535b4

66 files changed

Lines changed: 683 additions & 1808 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/copilot-coding-agent-setup.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,14 @@ Run all three commands unconditionally:
2525
- `set-branches` resets the remote's fetch refspec to the standard glob `+refs/heads/*:refs/remotes/origin/*`, removing any single-branch refspec that a shallow clone may have injected. Without this, LibGit2Sharp (used by GitVersion 5.12.0) crashes with `ref 'refs/remotes/origin/develop' doesn't match the destination` because it iterates refspecs in order and fails on the first non-matching one instead of falling through to the glob.
2626
- The final fetch brings `refs/remotes/origin/develop` into the local ref store through that glob refspec so GitVersion can find it.
2727

28+
The same fix must be applied to every submodule recursively: `Rampastring.XNAUI` and its nested `Rampastring.Tools` submodule also carry `GitVersion.MsBuild` and are subject to the same crash when checked out with a narrow single-branch refspec.
29+
2830
```shell
2931
git fetch --unshallow origin || true
3032
git remote set-branches origin '*'
3133
git fetch origin develop
34+
git submodule foreach --recursive \
35+
'git fetch --unshallow origin || true; git remote set-branches origin "*"; git fetch origin'
3236
```
3337

3438
## Step 3 — Restore NuGet packages

.github/workflows/copilot-setup-steps.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@ jobs:
3232
git fetch --unshallow origin || true
3333
git remote set-branches origin '*'
3434
git fetch origin develop
35+
# Apply the same fix to every submodule (including nested ones), because GitVersion.MsBuild
36+
# runs against each submodule directory that carries it, and the same LibGit2Sharp refspec
37+
# crash occurs there when the submodule was checked out with a narrow single-branch refspec.
38+
git submodule foreach --recursive \
39+
'git fetch --unshallow origin || true; git remote set-branches origin "*"; git fetch origin'
3540
3641
- name: Set up .NET SDK
3742
uses: actions/setup-dotnet@v4
@@ -40,3 +45,6 @@ jobs:
4045

4146
- name: Restore NuGet packages
4247
run: dotnet restore -p:Configuration=UniversalGLRelease
48+
49+
- name: Build
50+
run: dotnet build DXMainClient/DXMainClient.csproj -p:Configuration=UniversalGLRelease -f net8.0 --no-restore

ClientCore/ClientConfiguration.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,13 @@ private List<TranslationGameFile> ParseTranslationGameFiles()
365365

366366
public string KeyboardINI => clientDefinitionsIni.GetStringValue(SETTINGS, "KeyboardINI", "Keyboard.ini");
367367

368+
public bool SettingsIniAsKeyboardIni => SettingsIniName == KeyboardINI;
369+
370+
public string KeyboardHotkeySection => clientDefinitionsIni.GetStringValue(
371+
SETTINGS,
372+
"KeyboardHotkeySection",
373+
ClientGameType == ClientType.RA ? "WinHotKeys" : "Hotkey");
374+
368375
public int MinimumIngameWidth => clientDefinitionsIni.GetIntValue(SETTINGS, "MinimumIngameWidth", 640);
369376

370377
public int MinimumIngameHeight => clientDefinitionsIni.GetIntValue(SETTINGS, "MinimumIngameHeight", 480);

ClientCore/Settings/UserINISettings.cs

Lines changed: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,22 @@ protected UserINISettings(IniFile iniFile)
9393
else
9494
BackBufferInVRAM = new BoolSetting(iniFile, VIDEO, "VideoBackBuffer", false);
9595

96-
IngameScreenWidth = new IntSetting(iniFile, VIDEO, "ScreenWidth", 1024);
97-
IngameScreenHeight = new IntSetting(iniFile, VIDEO, "ScreenHeight", 768);
96+
IngameScreenWidth = new IntSetting(
97+
iniFile,
98+
ClientConfiguration.Instance.ClientGameType == ClientType.RA ? OPTIONS : VIDEO,
99+
ClientConfiguration.Instance.ClientGameType == ClientType.RA ? "Width" : "ScreenWidth",
100+
1024);
101+
102+
IngameScreenHeight = new IntSetting(
103+
iniFile,
104+
ClientConfiguration.Instance.ClientGameType == ClientType.RA ? OPTIONS : VIDEO,
105+
ClientConfiguration.Instance.ClientGameType == ClientType.RA ? "Height" : "ScreenHeight",
106+
768);
107+
98108
ClientTheme = new StringSetting(iniFile, MULTIPLAYER, "Theme", ClientConfiguration.Instance.GetThemeInfoFromIndex(0).Name);
99109
Translation = new StringSetting(iniFile, OPTIONS, "Translation", I18N.Translation.GetDefaultTranslationLocaleCode());
110+
TranslationGameFilesVersion = new StringSetting(iniFile, OPTIONS, nameof(TranslationGameFilesVersion), string.Empty);
111+
100112
DetailLevel = new IntSetting(iniFile, OPTIONS, "DetailLevel", 2);
101113
Renderer = new StringSetting(iniFile, COMPATIBILITY, "Renderer", string.Empty);
102114
WindowedMode = new BoolSetting(iniFile, VIDEO, ClientConfiguration.Instance.WindowedModeKey, false);
@@ -106,8 +118,17 @@ protected UserINISettings(IniFile iniFile)
106118
ClientFPS = new IntSetting(iniFile, VIDEO, "ClientFPS", 60);
107119
DisplayToggleableExtraTextures = new BoolSetting(iniFile, VIDEO, "DisplayToggleableExtraTextures", true);
108120

109-
ScoreVolume = new DoubleSetting(iniFile, AUDIO, "ScoreVolume", 0.7);
110-
SoundVolume = new DoubleSetting(iniFile, AUDIO, "SoundVolume", 0.7);
121+
// RA1 reads MultiplayerScoreVolume instead of ScoreVolume. This value is handled when saving
122+
ScoreVolume = new DoubleSetting(iniFile,
123+
ClientConfiguration.Instance.ClientGameType == ClientType.RA ? OPTIONS : AUDIO,
124+
"ScoreVolume",
125+
0.7);
126+
127+
SoundVolume = new DoubleSetting(iniFile,
128+
ClientConfiguration.Instance.ClientGameType == ClientType.RA ? OPTIONS : AUDIO,
129+
ClientConfiguration.Instance.ClientGameType == ClientType.RA ? "Volume" : "SoundVolume",
130+
0.7);
131+
111132
VoiceVolume = new DoubleSetting(iniFile, AUDIO, "VoiceVolume", 0.7);
112133
IsScoreShuffle = new BoolSetting(iniFile, AUDIO, "IsScoreShuffle", true);
113134
ClientVolume = new DoubleSetting(iniFile, AUDIO, "ClientVolume", 1.0);
@@ -176,9 +197,11 @@ protected UserINISettings(IniFile iniFile)
176197

177198
public IntSetting IngameScreenWidth { get; private set; }
178199
public IntSetting IngameScreenHeight { get; private set; }
200+
179201
public StringSetting ClientTheme { get; private set; }
180202
public string ThemeFolderPath => ClientConfiguration.Instance.GetThemePath(ClientTheme);
181203
public StringSetting Translation { get; private set; }
204+
public StringSetting TranslationGameFilesVersion { get; private set; }
182205
public string TranslationFolderPath => SafePath.CombineDirectoryPath(
183206
ClientConfiguration.Instance.TranslationsFolderPath, Translation);
184207
public string TranslationThemeFolderPath => SafePath.CombineDirectoryPath(
@@ -447,6 +470,10 @@ public void SaveSettings()
447470
ApplyDefaults();
448471
// CleanUpLegacySettings();
449472

473+
// RA1 reads MultiplayerScoreVolume instead of ScoreVolume
474+
if (ClientConfiguration.Instance.ClientGameType == ClientType.RA)
475+
SettingsIni.SetDoubleValue(OPTIONS, "MultiplayerScoreVolume", SettingsIni.GetDoubleValue(OPTIONS, "ScoreVolume", 0.7));
476+
450477
SettingsIni.WriteIniFile();
451478

452479
SettingsSaved?.Invoke(this, EventArgs.Empty);

0 commit comments

Comments
 (0)