mirror of
https://github.com/hedge-dev/UnleashedRecomp
synced 2026-06-08 20:30:02 -04:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 12f2e6a42a |
@@ -1,8 +1,5 @@
|
||||
#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 g_timeBetweenUpdateChecksInSeconds hours.
|
||||
// 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;
|
||||
time_t timeNow = std::time(nullptr);
|
||||
double timeDifferenceSeconds = difftime(timeNow, Config::LastChecked);
|
||||
if (timeDifferenceSeconds > g_timeBetweenUpdateChecksInSeconds)
|
||||
if (timeDifferenceSeconds > TimeBetweenUpdateChecksInSeconds)
|
||||
{
|
||||
UpdateChecker::initialize();
|
||||
UpdateChecker::start();
|
||||
|
||||
@@ -129,9 +129,7 @@ PPC_FUNC(sub_822C55B0)
|
||||
|
||||
void PressStartSaveLoadThreadMidAsmHook()
|
||||
{
|
||||
time_t timeNow = std::time(nullptr);
|
||||
double timeDifferenceSeconds = difftime(timeNow, Config::LastChecked);
|
||||
if (UpdateChecker::check() == UpdateChecker::Result::UpdateAvailable && timeDifferenceSeconds > g_timeBetweenUpdateChecksInSeconds)
|
||||
if (UpdateChecker::check() == UpdateChecker::Result::UpdateAvailable)
|
||||
{
|
||||
g_updateAvailableMessageOpen = true;
|
||||
g_updateAvailableMessageOpen.wait(true);
|
||||
|
||||
@@ -1255,9 +1255,14 @@ static void DrawConfigOptions()
|
||||
|
||||
case 3: // VIDEO
|
||||
{
|
||||
DrawConfigOption(rowCount++, yOffset, &Config::WindowSize,
|
||||
!Config::Fullscreen, &Localise("Options_Desc_NotAvailableFullscreen"),
|
||||
0, 0, (int32_t)GameWindow::GetDisplayModes().size() - 1, false);
|
||||
auto displayModeCount = (int32_t)GameWindow::GetDisplayModes().size();
|
||||
auto canChangeWindowSize = !Config::Fullscreen && displayModeCount > 1;
|
||||
auto windowSizeReason = &Localise("Options_Desc_NotAvailableFullscreen");
|
||||
|
||||
if (!Config::Fullscreen && displayModeCount <= 1)
|
||||
windowSizeReason = &Localise("Options_Desc_NotAvailableHardware");
|
||||
|
||||
DrawConfigOption(rowCount++, yOffset, &Config::WindowSize, canChangeWindowSize, windowSizeReason, 0, 0, displayModeCount - 1, false);
|
||||
|
||||
auto displayCount = GameWindow::GetDisplayCount();
|
||||
auto canChangeMonitor = Config::Fullscreen && displayCount > 1;
|
||||
|
||||
Reference in New Issue
Block a user