Skip to content

Commit

Permalink
Temporarily removed Start Screen for being broken in most cases
Browse files Browse the repository at this point in the history
Will make a return later.
This is just currently causing more issues than its worth.
  • Loading branch information
HerpDerpinstine committed Sep 26, 2024
1 parent a8033a5 commit bc67213
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 12 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,8 @@ jobs:
copy LICENSE.md Output\Debug\x64\MelonLoader\Documentation\
copy NOTICE.txt Output\Debug\x64\MelonLoader\Documentation\
copy README.md Output\Debug\x64\MelonLoader\Documentation\
del Output\Debug\x64\MelonLoader\net6\MelonStartScreen.dll
del Output\Debug\x64\MelonLoader\net6\MelonStartScreen.deps.json
- uses: actions/upload-artifact@v4
name: Upload Zip | Windows - x64
with:
Expand Down Expand Up @@ -233,6 +235,8 @@ jobs:
copy LICENSE.md Output\Debug\x86\MelonLoader\Documentation\
copy NOTICE.txt Output\Debug\x86\MelonLoader\Documentation\
copy README.md Output\Debug\x86\MelonLoader\Documentation\
del Output\Debug\x86\MelonLoader\net6\MelonStartScreen.dll
del Output\Debug\x86\MelonLoader\net6\MelonStartScreen.deps.json
- uses: actions/upload-artifact@v4
name: Upload Zip | Windows - x86
with:
Expand Down Expand Up @@ -277,6 +281,8 @@ jobs:
copy LICENSE.md Output\Release\x64\MelonLoader\Documentation\
copy NOTICE.txt Output\Release\x64\MelonLoader\Documentation\
copy README.md Output\Release\x64\MelonLoader\Documentation\
del Output\Release\x64\MelonLoader\net6\MelonStartScreen.dll
del Output\Release\x64\MelonLoader\net6\MelonStartScreen.deps.json
- uses: actions/upload-artifact@v4
name: Upload Zip | Windows - x64
with:
Expand Down Expand Up @@ -321,6 +327,8 @@ jobs:
copy LICENSE.md Output\Release\x86\MelonLoader\Documentation\
copy NOTICE.txt Output\Release\x86\MelonLoader\Documentation\
copy README.md Output\Release\x86\MelonLoader\Documentation\
del Output\Release\x86\MelonLoader\net6\MelonStartScreen.dll
del Output\Release\x86\MelonLoader\net6\MelonStartScreen.deps.json
- uses: actions/upload-artifact@v4
name: Upload Zip | Windows - x86
with:
Expand Down Expand Up @@ -362,6 +370,8 @@ jobs:
copy LICENSE.md Output\Debug\x64\MelonLoader\Documentation\
copy NOTICE.txt Output\Debug\x64\MelonLoader\Documentation\
copy README.md Output\Debug\x64\MelonLoader\Documentation\
del Output\Debug\x64\MelonLoader\net6\MelonStartScreen.dll
del Output\Debug\x64\MelonLoader\net6\MelonStartScreen.deps.json
- uses: actions/upload-artifact@v4
name: Upload Zip | Linux - x64
with:
Expand Down Expand Up @@ -403,6 +413,8 @@ jobs:
copy LICENSE.md Output\Release\x64\MelonLoader\Documentation\
copy NOTICE.txt Output\Release\x64\MelonLoader\Documentation\
copy README.md Output\Release\x64\MelonLoader\Documentation\
del Output\Release\x64\MelonLoader\net6\MelonStartScreen.dll
del Output\Release\x64\MelonLoader\net6\MelonStartScreen.deps.json
- uses: actions/upload-artifact@v4
name: Upload Zip | Linux - x64
with:
Expand Down
24 changes: 12 additions & 12 deletions MelonLoader/InternalUtils/MelonStartScreen.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System.IO;
using AssetRipper.VersionUtilities;
using MelonLoader.Modules;
using MelonLoader.Utils;
//using System.IO;
//using AssetRipper.VersionUtilities;
//using MelonLoader.Modules;
//using MelonLoader.Utils;

namespace MelonLoader.InternalUtils
{
Expand All @@ -10,20 +10,20 @@ internal class MelonStartScreen
// Doesn't support Unity versions lower than 2017.2.0 (yet?)
// Doesn't support Unity versions lower than 2018 (Crashing Issue)
// Doesn't support Unity versions higher than to 2020.3.21 (Crashing Issue)
internal static readonly MelonModule.Info moduleInfo = new MelonModule.Info($"{MelonEnvironment.OurRuntimeDirectory}{Path.DirectorySeparatorChar}MelonStartScreen.dll"
, () => !MelonLaunchOptions.Core.StartScreen || UnityInformationHandler.EngineVersion < new UnityVersion(2018));
//internal static readonly MelonModule.Info moduleInfo = new MelonModule.Info($"{MelonEnvironment.OurRuntimeDirectory}{Path.DirectorySeparatorChar}MelonStartScreen.dll"
// , () => !MelonLaunchOptions.Core.StartScreen || UnityInformationHandler.EngineVersion < new UnityVersion(2018));

internal static int LoadAndRun(LemonFunc<int> functionToWaitForAsync)
{
var module = MelonModule.Load(moduleInfo);
if (module == null)
//var module = MelonModule.Load(moduleInfo);
//if (module == null)
return functionToWaitForAsync();

var result = module.SendMessage("LoadAndRun", functionToWaitForAsync);
if (result is int resultCode)
return resultCode;
//var result = module.SendMessage("LoadAndRun", functionToWaitForAsync);
//if (result is int resultCode)
// return resultCode;

return -1;
//return -1;
}
}
}

0 comments on commit bc67213

Please sign in to comment.