mirror of
https://github.com/ZDoom/qzdoom.git
synced 2025-03-17 00:11:05 +00:00
Merge branch 'master' of https://github.com/coelckers/gzdoom
This commit is contained in:
commit
2f093c5988
2 changed files with 5 additions and 4 deletions
|
@ -132,7 +132,7 @@ int I_WaitForTic(int prevtic)
|
|||
{
|
||||
// The minimum amount of time a thread can sleep is controlled by timeBeginPeriod.
|
||||
// We set this to 1 ms in DoMain.
|
||||
int sleepTime = prevtic - time;
|
||||
uint64_t sleepTime = NSToMS(FirstFrameStartTime + TicToNS(prevtic + 1) - I_nsTime());
|
||||
if (sleepTime > 2)
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(sleepTime - 2));
|
||||
|
||||
|
@ -154,7 +154,7 @@ uint64_t I_msTime()
|
|||
|
||||
int I_GetTime()
|
||||
{
|
||||
return NSToTic(CurrentFrameStartTime - FirstFrameStartTime) + 1;
|
||||
return NSToTic(CurrentFrameStartTime - FirstFrameStartTime);
|
||||
}
|
||||
|
||||
double I_GetTimeFrac()
|
||||
|
|
|
@ -557,11 +557,12 @@ void I_SetWindowTitle(const char* caption)
|
|||
{
|
||||
auto Screen = static_cast<SDLFB *>(screen)->GetSDLWindow();
|
||||
if (caption)
|
||||
SDL_SetWindowTitle(Screen, caption);
|
||||
SDL_SetWindowTitle(static_cast<SDLFB *>(screen)->GetSDLWindow(), caption);
|
||||
else
|
||||
{
|
||||
FString default_caption;
|
||||
default_caption.Format(GAMESIG " %s (%s)", GetVersionString(), GetGitTime());
|
||||
SDL_SetWindowTitle(Screen, default_caption);
|
||||
SDL_SetWindowTitle(static_cast<SDLFB *>(screen)->GetSDLWindow(), default_caption);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue