Lots of stuff

This commit is contained in:
elasota
2019-11-11 00:11:59 -05:00
parent 49a35bb15b
commit c8472f7295
406 changed files with 58313 additions and 88 deletions

57
GpApp/GpAppInterface.cpp Normal file
View File

@@ -0,0 +1,57 @@
#include "GpAppInterface.h"
#include "DisplayDeviceManager.h"
#include "HostFileSystem.h"
#include "HostDisplayDriver.h"
#include "HostSystemServices.h"
int gpAppMain();
class GpAppInterfaceImpl final : public GpAppInterface
{
public:
int ApplicationMain() override;
void PL_IncrementTickCounter(uint32_t count) override;
void PL_HostFileSystem_SetInstance(PortabilityLayer::HostFileSystem *instance) override;
void PL_HostDisplayDriver_SetInstance(PortabilityLayer::HostDisplayDriver *instance) override;
void PL_HostSystemServices_SetInstance(PortabilityLayer::HostSystemServices *instance) override;
void PL_InstallHostSuspendHook(PortabilityLayer::HostSuspendHook_t hook, void *context) override;
};
int GpAppInterfaceImpl::ApplicationMain()
{
return gpAppMain();
}
void GpAppInterfaceImpl::PL_IncrementTickCounter(uint32_t count)
{
PortabilityLayer::DisplayDeviceManager::GetInstance()->IncrementTickCount(count);
}
void GpAppInterfaceImpl::PL_HostFileSystem_SetInstance(PortabilityLayer::HostFileSystem *instance)
{
PortabilityLayer::HostFileSystem::SetInstance(instance);
}
void GpAppInterfaceImpl::PL_HostDisplayDriver_SetInstance(PortabilityLayer::HostDisplayDriver *instance)
{
PortabilityLayer::HostDisplayDriver::SetInstance(instance);
}
void GpAppInterfaceImpl::PL_HostSystemServices_SetInstance(PortabilityLayer::HostSystemServices *instance)
{
PortabilityLayer::HostSystemServices::SetInstance(instance);
}
void GpAppInterfaceImpl::PL_InstallHostSuspendHook(PortabilityLayer::HostSuspendHook_t hook, void *context)
{
PortabilityLayer::InstallHostSuspendHook(hook, context);
}
static GpAppInterfaceImpl gs_application;
extern "C" GpAppInterface *GpAppInterface_Get()
{
return &gs_application;
}