mirror of
https://github.com/hedge-dev/UnleashedRecomp.git
synced 2025-10-30 07:11:05 +00:00
Cherry pick of global delta time from 'options-menu' branch.
Co-authored-by: Hyper <34012267+hyperbx@users.noreply.github.com>
This commit is contained in:
parent
2fd26cfd80
commit
e403f961aa
4 changed files with 23 additions and 13 deletions
|
|
@ -79,6 +79,7 @@ set(SWA_UI_CXX_SOURCES
|
|||
)
|
||||
|
||||
set(SWA_CXX_SOURCES
|
||||
"app.cpp"
|
||||
"main.cpp"
|
||||
"misc_impl.cpp"
|
||||
"stdafx.cpp"
|
||||
|
|
|
|||
19
UnleashedRecomp/app.cpp
Normal file
19
UnleashedRecomp/app.cpp
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
#include <kernel/function.h>
|
||||
#include <ui/window.h>
|
||||
#include <app.h>
|
||||
|
||||
double g_deltaTime;
|
||||
|
||||
// CApplication::Update
|
||||
PPC_FUNC_IMPL(__imp__sub_822C1130);
|
||||
PPC_FUNC(sub_822C1130)
|
||||
{
|
||||
g_deltaTime = ctx.f1.f64;
|
||||
|
||||
SDL_PumpEvents();
|
||||
SDL_FlushEvents(SDL_FIRSTEVENT, SDL_LASTEVENT);
|
||||
|
||||
Window::Update();
|
||||
|
||||
__imp__sub_822C1130(ctx, base);
|
||||
}
|
||||
3
UnleashedRecomp/app.h
Normal file
3
UnleashedRecomp/app.h
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
#pragma once
|
||||
|
||||
extern double g_deltaTime;
|
||||
|
|
@ -1,7 +1,6 @@
|
|||
#include "window.h"
|
||||
#include "sdl_listener.h"
|
||||
#include <cfg/config.h>
|
||||
#include <kernel/function.h>
|
||||
#include <SDL_syswm.h>
|
||||
|
||||
bool m_isFullscreenKeyReleased = true;
|
||||
|
|
@ -175,15 +174,3 @@ void Window::Update()
|
|||
Config::WindowHeight = Window::s_height;
|
||||
}
|
||||
}
|
||||
|
||||
// CApplication::Update
|
||||
PPC_FUNC_IMPL(__imp__sub_822C1130);
|
||||
PPC_FUNC(sub_822C1130)
|
||||
{
|
||||
SDL_PumpEvents();
|
||||
SDL_FlushEvents(SDL_FIRSTEVENT, SDL_LASTEVENT);
|
||||
|
||||
Window::Update();
|
||||
|
||||
__imp__sub_822C1130(ctx, base);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue