Skip to content

Commit

Permalink
test async again
Browse files Browse the repository at this point in the history
  • Loading branch information
ThirteenAG committed Jun 17, 2024
1 parent 0f7f935 commit b3b7100
Show file tree
Hide file tree
Showing 22 changed files with 26 additions and 25 deletions.
2 changes: 1 addition & 1 deletion source/altdialogue.ixx
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ class AltDialogue
public:
AltDialogue()
{
FusionFix::onInitEvent() += []()
FusionFix::onInitEventAsync() += []()
{
FusionFixSettings.SetCallback("PREF_ALTDIALOGUE", [](int32_t value) {
auto pGlobals = *rage::scrProgram::ms_pGlobals;
Expand Down
2 changes: 1 addition & 1 deletion source/buttons.ixx
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ private:
public:
Buttons()
{
FusionFix::onInitEvent() += []()
FusionFix::onInitEventAsync() += []()
{
auto pattern = hook::pattern("83 C4 14 B9 ? ? ? ? 68 ? ? ? ? E8");
if (!pattern.empty())
Expand Down
2 changes: 1 addition & 1 deletion source/consoleshadows.ixx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class ConsoleShadows
public:
ConsoleShadows()
{
FusionFix::onInitEvent() += []()
FusionFix::onInitEventAsync() += []()
{
CIniReader iniReader("");
bHeadlightShadows = iniReader.ReadInteger("SHADOWS", "HeadlightShadows", 1) != 0;
Expand Down
2 changes: 1 addition & 1 deletion source/coronas.ixx
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ class Coronas
public:
Coronas()
{
FusionFix::onInitEvent() += []()
FusionFix::onInitEventAsync() += []()
{
auto pattern = hook::pattern("81 FE ? ? ? ? 0F 8D ? ? ? ? 8B 44 24 08 8B 4C 24 1C F3 0F 10 44 24 ? C1 E2 06");
if (!pattern.empty())
Expand Down
2 changes: 1 addition & 1 deletion source/cutscenecam.ixx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class CutsceneCam
public:
CutsceneCam()
{
FusionFix::onInitEvent() += []()
FusionFix::onInitEventAsync() += []()
{
CIniReader iniReader("");
auto bExtraCutsceneFix = iniReader.ReadInteger("MISC", "ExtraCutsceneFix", 1) != 0;
Expand Down
2 changes: 1 addition & 1 deletion source/extrainfo.ixx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class ExtraInfo
public:
ExtraInfo()
{
FusionFix::onInitEvent() += []()
FusionFix::onInitEventAsync() += []()
{
CIniReader iniReader("");

Expand Down
2 changes: 1 addition & 1 deletion source/fixes.ixx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public:

Fixes()
{
FusionFix::onInitEvent() += []()
FusionFix::onInitEventAsync() += []()
{
CIniReader iniReader("");

Expand Down
4 changes: 2 additions & 2 deletions source/framelimit.ixx
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ class Framelimit
public:
Framelimit()
{
FusionFix::onInitEvent() += []()
FusionFix::onInitEventAsync() += []()
{
CIniReader iniReader("");

Expand Down Expand Up @@ -247,7 +247,7 @@ public:
}
};

FusionFix::onInitEvent() += []()
FusionFix::onInitEventAsync() += []()
{
// Off Route infinite loading (CCutsceneObject method causes CRenderer::removeAllTexturesFromDictionary to softlock for unidentified reason)
auto pattern = hook::pattern("E8 ? ? ? ? 83 C4 0C C7 04 B5 ? ? ? ? ? ? ? ? 4E");
Expand Down
2 changes: 1 addition & 1 deletion source/frameratevigilante.ixx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class FramerateVigilante
public:
FramerateVigilante()
{
FusionFix::onInitEvent() += []()
FusionFix::onInitEventAsync() += []()
{
// Handbrake Cam (test)
auto pattern = find_pattern("E8 ? ? ? ? D9 5C 24 7C F3 0F 10 4C 24", "E8 ? ? ? ? D9 5C 24 70 F3 0F 10 44 24 ? F3 0F 58 86");
Expand Down
2 changes: 1 addition & 1 deletion source/ikeeponwalking.ixx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class IKeepOnWalking
public:
IKeepOnWalking()
{
FusionFix::onInitEvent() += []()
FusionFix::onInitEventAsync() += []()
{
CIniReader iniReader("");
static int32_t nWalkKey = iniReader.ReadInteger("MISC", "WalkKey", VK_MENU);
Expand Down
4 changes: 2 additions & 2 deletions source/limits.ixx
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ class Limits
public:
Limits()
{
FusionFix::onInitEvent() += []()
FusionFix::onInitEventAsync() += []()
{
CIniReader iniReader("");

Expand Down Expand Up @@ -251,7 +251,7 @@ class ExtendedLimits
public:
ExtendedLimits()
{
FusionFix::onInitEvent() += []()
FusionFix::onInitEventAsync() += []()
{
CIniReader iniReader("");

Expand Down
2 changes: 1 addition & 1 deletion source/modupdater.ixx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public:

ModUpdater()
{
FusionFix::onInitEvent() += []()
FusionFix::onInitEventAsync() += []()
{
if (FusionFixSettings.Get("PREF_UPDATE"))
Initialize();
Expand Down
4 changes: 2 additions & 2 deletions source/postfx.ixx
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ PostFxResource PostFxResources;
class PostFX {
public:
PostFX() {
FusionFix::onInitEvent() += []()
FusionFix::onInitEventAsync() += []()
{
if (!GetD3DX9_43DLL())
return;
Expand All @@ -347,7 +347,7 @@ public:
useSSAA = false;

static HMODULE hm = NULL;
GetModuleHandleExW(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS | GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT, (LPCWSTR)&FusionFix::onInitEvent, &hm);
GetModuleHandleExW(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS | GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT, (LPCWSTR)&FusionFix::onInitEventAsync, &hm);

FusionFix::D3D9::onAfterCreateVertexShader() += [](LPDIRECT3DDEVICE9& pDevice, DWORD*& pFunction, IDirect3DVertexShader9**& ppShader)
{
Expand Down
2 changes: 1 addition & 1 deletion source/rawinput.ixx
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ class RawInput
public:
RawInput()
{
FusionFix::onInitEvent() += []()
FusionFix::onInitEventAsync() += []()
{
// Menu
auto pattern = hook::pattern("0F 48 C1 A3 ? ? ? ? 5F");
Expand Down
2 changes: 1 addition & 1 deletion source/settings.ixx
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ class Settings
public:
Settings()
{
FusionFix::onInitEvent() += []()
FusionFix::onInitEventAsync() += []()
{
// runtime settings
auto pattern = hook::pattern("89 1C ? ? ? ? ? E8 ? ? ? ? A1");
Expand Down
4 changes: 2 additions & 2 deletions source/shaders.ixx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public:
static float fShadowBias = 5.0f;
static float fShadowBlendRange = 0.3f;

FusionFix::onInitEvent() += []()
FusionFix::onInitEventAsync() += []()
{
CIniReader iniReader("");
bFixAutoExposure = iniReader.ReadInteger("MISC", "FixAutoExposure", 1) != 0;
Expand Down Expand Up @@ -263,7 +263,7 @@ public:
};
};

FusionFix::onInitEvent() += []()
FusionFix::onInitEventAsync() += []()
{
CIniReader iniReader("");
static auto bFixRainDrops = iniReader.ReadInteger("MISC", "FixRainDrops", 1) != 0;
Expand Down
2 changes: 1 addition & 1 deletion source/shadows.ixx
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ class Shadows
public:
Shadows()
{
FusionFix::onInitEvent() += []()
FusionFix::onInitEventAsync() += []()
{
CIniReader iniReader("");

Expand Down
2 changes: 1 addition & 1 deletion source/snow/snow.ixx
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ private:
public:
Snow()
{
FusionFix::onInitEvent() += []()
FusionFix::onInitEventAsync() += []()
{
if (GetD3DX9_43DLL())
{
Expand Down
2 changes: 1 addition & 1 deletion source/timecyc.ixx
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ class Timecyc
public:
Timecyc()
{
FusionFix::onInitEvent() += []()
FusionFix::onInitEventAsync() += []()
{
FusionFixSettings.SetCallback("PREF_TIMECYC", [](int32_t value) {
CTimeCycle::Initialise();
Expand Down
2 changes: 1 addition & 1 deletion source/userdata.ixx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class UserData
public:
UserData()
{
FusionFix::onInitEvent() += []()
FusionFix::onInitEventAsync() += []()
{
CIniReader iniReader("");
customUserProfilePath = std::filesystem::path(iniReader.ReadString("USERPROFILE", "CustomUserProfilePath", ""));
Expand Down
2 changes: 1 addition & 1 deletion source/widescreenfix.ixx
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ public:

WidescreenFix()
{
FusionFix::onInitEvent() += []()
FusionFix::onInitEventAsync() += []()
{
// CSprite2d
auto pattern = find_pattern("6A 00 E8 ? ? ? ? 8B 44 24 08 83 C4 04 F3 0F 10 40", "6A 00 E8 ? ? ? ? D9 EE 8B 44 24 0C");
Expand Down
1 change: 1 addition & 0 deletions source/windowed.ixx
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ void SwitchWindowStyle()
AdjustWindowRect(&rect, lStyle, FALSE);
SetWindowLong(gWnd, GWL_STYLE, lStyle);
MoveWindow_Hook(gWnd, 0, 0, rect.right - rect.left, rect.bottom - rect.top, TRUE);
SetFocus(gWnd);
}
}

Expand Down

0 comments on commit b3b7100

Please sign in to comment.