Display driver loop refactor

This commit is contained in:
elasota
2021-03-26 17:05:38 -04:00
parent 48fe83bb33
commit c87f238563
30 changed files with 595 additions and 735 deletions

View File

@@ -1,22 +1,17 @@
#include "HostSuspendHook.h"
#include "HostSuspendCallArgument.h"
#include "HostSuspendCallArgument.h"
#include "DisplayDeviceManager.h"
#include "PLDrivers.h"
#include "IGpDisplayDriver.h"
namespace
{
static PortabilityLayer::HostSuspendHook_t gs_suspendHook;
static void *gs_suspendContext;
}
namespace PortabilityLayer
{
void InstallHostSuspendHook(HostSuspendHook_t hook, void *context)
void RenderFrames(unsigned int ticks)
{
gs_suspendHook = hook;
gs_suspendContext = context;
}
void SuspendApplication(HostSuspendCallID callID, const HostSuspendCallArgument *args, HostSuspendCallArgument *returnValue)
{
gs_suspendHook(gs_suspendContext, callID, args, returnValue);
PLDrivers::GetDisplayDriver()->ServeTicks(ticks);
DisplayDeviceManager::GetInstance()->IncrementTickCount(ticks);
}
}