Skip to content

Commit 6af7c75

Browse files
Fixed W11 mod loading for <= Yakuza 6 (#38)
1 parent 9ed6de2 commit 6af7c75

5 files changed

Lines changed: 22 additions & 3 deletions

File tree

ShinRyuModManager-CE/Program.cs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ private static void Main(string[] args) {
7474
if (!OperatingSystem.IsWindows()) {
7575
IsRebuildMloSupported = false;
7676
}
77+
78+
HandleLoader();
7779

7880
// Check if there are any args, if so, run in CLI mode
7981
// Unfortunately, no one way to detect left Ctrl while being cross-platform
@@ -102,6 +104,8 @@ private static async Task MainCli(string[] args) {
102104
Log.Information("Shin Ryu Mod Manager-CE v{Version}", AssemblyVersion.GetVersion());
103105
Log.Information("By TheTrueColonel (a port of SRMM Studio's work)");
104106

107+
HandleLoader();
108+
105109
// Parse arguments
106110
var list = new List<string>(args);
107111

@@ -384,6 +388,12 @@ internal static bool ShouldBeExternalOnly() {
384388
return _externalModsOnly && Directory.Exists(GamePath.ExternalModsPath);
385389
}
386390

391+
private static void HandleLoader() {
392+
if (GamePath.CurrentGame <= Game.Yakuza6 && !File.Exists(Constants.DINPUT8DLL)) {
393+
File.Move(Constants.VERSIONDLL, Constants.DINPUT8DLL);
394+
}
395+
}
396+
387397
private static List<ModInfo> ScanMods(ProfileMask activeProfiles = ProfileMask.All) {
388398
var mods = new List<ModInfo>();
389399

@@ -405,7 +415,7 @@ private static List<ModInfo> ScanMods(ProfileMask activeProfiles = ProfileMask.A
405415
}
406416

407417
internal static bool MissingDll() {
408-
return File.Exists(Constants.VERSIONDLL);
418+
return File.Exists(Constants.VERSIONDLL) || File.Exists(Constants.DINPUT8DLL);
409419
}
410420

411421
internal static bool MissingAsi() {

ShinRyuModManager-CE/ShinRyuModManager-CE.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<AvaloniaUseCompiledBindingsByDefault>true</AvaloniaUseCompiledBindingsByDefault>
1515

1616
<!-- Versioning -->
17-
<AssemblyVersion>1.4.8</AssemblyVersion>
17+
<AssemblyVersion>1.4.9</AssemblyVersion>
1818
<VersionPrefix>$(AssemblyVersion)</VersionPrefix>
1919
<AssemblyTitle>ShinRyuModManager-CE</AssemblyTitle>
2020
<Company>SRMM Studio</Company>

ShinRyuModManager-CE/UserInterface/Assets/changelog.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1-
> ### **%{color:gold} Version 1.4.8 %** ###
1+
> ### **%{color:gold} Version 1.4.9 %** ###
2+
* Implemented changes from SRMM 4.8.2 (Fixed mods not loading for Yakuza 6 and earlier)
3+
* Windows 11 just wants to be complicated
4+
5+
---
6+
7+
> ### **%{color:orange} Version 1.4.8 %** ###
28
* Implemented changes from SRMM 4.8.1 (Fixed mods not loading for Kiwami 3)
39
* Delete `winmm.dll` and `dinput8.dll` from your game directory
410

Utils/Constants.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ public static class Constants {
99
public const string MLO = "YakuzaParless.mlo";
1010
public const string ASI = "YakuzaParless.asi";
1111
public const string VERSIONDLL = "version.dll";
12+
public const string DINPUT8DLL = "dinput8.dll";
1213
public const string PARLESS_NAME = ".parless paths";
1314
public const string EXTERNAL_MODS = "_externalMods";
1415
public const string VORTEX_MANAGED_FILE = "__folder_managed_by_vortex";

Utils/GamePath.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ public static class GamePath {
1717
public static string LibrariesPath { get; }
1818
public static string LocalLibrariesPath { get; }
1919
public static string GameExe { get; }
20+
public static bool IsGOG { get; }
2021

2122
static GamePath() {
2223
FullGamePath = Environment.CurrentDirectory;
@@ -26,6 +27,7 @@ static GamePath() {
2627
ExternalModsPath = Path.Combine(ModsPath, Constants.EXTERNAL_MODS);
2728
LibrariesPath = Path.Combine(FullGamePath, LIBRARIES);
2829
LocalLibrariesPath = Path.Combine(LibrariesPath, Constants.LIBRARIES_INFO_REPO_FILE_PATH);
30+
IsGOG = File.Exists("galaxy64.dll");
2931

3032
// Try to get game
3133
foreach (var file in Directory.GetFiles(FullGamePath, "*.exe")) {

0 commit comments

Comments
 (0)