mirror of
https://github.com/hedge-dev/UnleashedRecomp.git
synced 2026-04-27 21:01:37 +00:00
Call timeBeginPeriod/timeEndPeriod.
This commit is contained in:
parent
8d834494f5
commit
8e602837e8
3 changed files with 16 additions and 1 deletions
|
|
@ -15,6 +15,11 @@ void App::Restart(std::vector<std::string> restartArgs)
|
||||||
void App::Exit()
|
void App::Exit()
|
||||||
{
|
{
|
||||||
Config::Save();
|
Config::Save();
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
timeEndPeriod(1);
|
||||||
|
#endif
|
||||||
|
|
||||||
std::_Exit(0);
|
std::_Exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -546,7 +546,13 @@ uint32_t KeDelayExecutionThread(uint32_t WaitMode, bool Alertable, be<int64_t>*
|
||||||
if (Alertable)
|
if (Alertable)
|
||||||
return STATUS_USER_APC;
|
return STATUS_USER_APC;
|
||||||
|
|
||||||
std::this_thread::sleep_for(std::chrono::milliseconds(GuestTimeoutToMilliseconds(Timeout)));
|
uint32_t timeout = GuestTimeoutToMilliseconds(Timeout);
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
Sleep(timeout);
|
||||||
|
#else
|
||||||
|
std::this_thread::sleep_for(std::chrono::milliseconds(timeout));
|
||||||
|
#endif
|
||||||
|
|
||||||
return STATUS_SUCCESS;
|
return STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -137,6 +137,10 @@ uint32_t LdrLoadModule(const std::filesystem::path &path)
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
#ifdef _WIN32
|
||||||
|
timeBeginPeriod(1);
|
||||||
|
#endif
|
||||||
|
|
||||||
os::logger::Init();
|
os::logger::Init();
|
||||||
|
|
||||||
bool forceInstaller = false;
|
bool forceInstaller = false;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue