Skip to content

Commit

Permalink
fix led sdk init
Browse files Browse the repository at this point in the history
  • Loading branch information
ThirteenAG committed Jul 2, 2024
1 parent cd8ad92 commit 3f254b7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[MAIN]
EnableDoorSkip = 1
UnthrottleEmuDuringDoorSkip = 1
LightSyncRGB = 1
10 changes: 8 additions & 2 deletions source/ResidentEvil2.RE3.Dolphin.FusionMod/dllmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -188,12 +188,17 @@ void Init()
CIniReader iniReader("");
bEnableDoorSkip = iniReader.ReadInteger("MAIN", "EnableDoorSkip", 1) != 0;
bUnthrottleEmuDuringDoorSkip = iniReader.ReadInteger("MAIN", "UnthrottleEmuDuringDoorSkip", 1) != 0;
bLightSyncRGB = iniReader.ReadInteger("MAIN", "LightSyncRGB", 1) != 0;

if (!bEnableDoorSkip && !bUnthrottleEmuDuringDoorSkip && !bLightSyncRGB)
if (!bEnableDoorSkip && !bUnthrottleEmuDuringDoorSkip)
return;

std::thread(PluginThread, exitSignal.get_future()).detach();
}

void InitLED()
{
CIniReader iniReader("");
bLightSyncRGB = iniReader.ReadInteger("MAIN", "LightSyncRGB", 1) != 0;

if (bLightSyncRGB)
{
Expand Down Expand Up @@ -287,6 +292,7 @@ CEXP void InitializeASI()
{
std::call_once(CallbackHandler::flag, []()
{
CallbackHandler::RegisterCallback(InitLED);
CallbackHandler::RegisterCallbackAtGetSystemTimeAsFileTime(Init);
});
}
Expand Down

0 comments on commit 3f254b7

Please sign in to comment.