mirror of
https://github.com/hedge-dev/UnleashedRecomp
synced 2026-06-08 20:30:02 -04:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 460bc583a5 |
@@ -1,5 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
// 6 hour long timeout between checks.
|
||||
static constexpr double g_timeBetweenUpdateChecksInSeconds = 6 * 60 * 60;
|
||||
|
||||
struct UpdateChecker
|
||||
{
|
||||
enum class Result
|
||||
|
||||
@@ -307,11 +307,11 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
#endif
|
||||
|
||||
// Check the time since the last time an update was checked. Store the new time if the difference is more than six hours.
|
||||
constexpr double TimeBetweenUpdateChecksInSeconds = 6 * 60 * 60;
|
||||
// Check the time since the last time an update was checked.
|
||||
// Store the new time if the difference is more than g_timeBetweenUpdateChecksInSeconds hours.
|
||||
time_t timeNow = std::time(nullptr);
|
||||
double timeDifferenceSeconds = difftime(timeNow, Config::LastChecked);
|
||||
if (timeDifferenceSeconds > TimeBetweenUpdateChecksInSeconds)
|
||||
if (timeDifferenceSeconds > g_timeBetweenUpdateChecksInSeconds)
|
||||
{
|
||||
UpdateChecker::initialize();
|
||||
UpdateChecker::start();
|
||||
|
||||
@@ -129,7 +129,9 @@ PPC_FUNC(sub_822C55B0)
|
||||
|
||||
void PressStartSaveLoadThreadMidAsmHook()
|
||||
{
|
||||
if (UpdateChecker::check() == UpdateChecker::Result::UpdateAvailable)
|
||||
time_t timeNow = std::time(nullptr);
|
||||
double timeDifferenceSeconds = difftime(timeNow, Config::LastChecked);
|
||||
if (UpdateChecker::check() == UpdateChecker::Result::UpdateAvailable && timeDifferenceSeconds > g_timeBetweenUpdateChecksInSeconds)
|
||||
{
|
||||
g_updateAvailableMessageOpen = true;
|
||||
g_updateAvailableMessageOpen.wait(true);
|
||||
|
||||
@@ -1686,13 +1686,3 @@ void EndingTextPositionMidAsmHook(PPCRegister& r31, PPCRegister& f13)
|
||||
else if (align == ALIGN_LEFT)
|
||||
f13.f64 += 133.0 * (1.0 - g_aspectRatioNarrowScale);
|
||||
}
|
||||
|
||||
// Offsets calculated by converting the 4:3 values to 16:9 space and then substracting the differences from the original 16:9 position.
|
||||
// Afterward fact checked by overlaying a capture from the original hardware at 4:3 and a capture from recomp at 4:3.
|
||||
void AdvertiseLogoPlacementMidAsmHook(PPCRegister& f0, PPCRegister& f13, PPCRegister& f12, PPCRegister& f11)
|
||||
{
|
||||
f0.f64 += -133.0f / 1280.0f * (1.0 - g_aspectRatioNarrowScale);
|
||||
f13.f64 += 3.5f / 720.0f * (1.0 - g_aspectRatioNarrowScale);
|
||||
f12.f64 += -133.0f / 1280.0f * (1.0 - g_aspectRatioNarrowScale);
|
||||
f11.f64 += 3.5f / 720.0f * (1.0 - g_aspectRatioNarrowScale);
|
||||
}
|
||||
|
||||
@@ -1153,8 +1153,3 @@ registers = ["f1"]
|
||||
name = "CEvilSonicContext_CStateWall_LeaveRotationMidAsmHook"
|
||||
address = 0x82406774
|
||||
registers = ["f1"]
|
||||
|
||||
[[midasm_hook]]
|
||||
name = "AdvertiseLogoPlacementMidAsmHook"
|
||||
address = 0x82B729A0
|
||||
registers = ["f0", "f13", "f12", "f11"]
|
||||
|
||||
Reference in New Issue
Block a user