Code cleanup, move a lot of "Host" APIs to GpCommon

This commit is contained in:
elasota
2020-11-25 12:05:59 -05:00
parent 9d0f2c35b3
commit 5c640b72eb
102 changed files with 759 additions and 1072 deletions

View File

@@ -8,14 +8,14 @@
#include "DisplayDeviceManager.h"
#include "GpVOSEvent.h"
#include "IGpDisplayDriver.h"
#include "IGpVOSEventQueue.h"
#include "InputManager.h"
#include "HostDisplayDriver.h"
#include "HostFileSystem.h"
#include "HostSuspendCallArgument.h"
#include "HostSuspendHook.h"
#include "HostVOSEventQueue.h"
#include "MacRomanConversion.h"
#include "PLDrivers.h"
static void TranslateMouseInputEvent(const GpVOSEvent &vosEventBase, uint32_t timestamp, PortabilityLayer::EventQueue *queue)
{
const GpMouseInputEvent &vosEvent = vosEventBase.m_event.m_mouseInputEvent;
@@ -84,7 +84,7 @@ static void TranslateKeyboardInputEvent(const GpVOSEvent &vosEventBase, uint32_t
const KeyDownStates *keyStates = inputManager->GetKeys();
if (keyStates->m_special.Get(GpKeySpecials::kLeftAlt) || keyStates->m_special.Get(GpKeySpecials::kRightAlt))
{
IGpDisplayDriver *dd = PortabilityLayer::HostDisplayDriver::GetInstance();
IGpDisplayDriver *dd = PLDrivers::GetDisplayDriver();
if (dd)
dd->RequestToggleFullScreen(timestamp);
}
@@ -160,7 +160,7 @@ static void ImportVOSEvents(uint32_t timestamp)
{
PortabilityLayer::EventQueue *plQueue = PortabilityLayer::EventQueue::GetInstance();
PortabilityLayer::HostVOSEventQueue *evtQueue = PortabilityLayer::HostVOSEventQueue::GetInstance();
IGpVOSEventQueue *evtQueue = PLDrivers::GetVOSEventQueue();
while (const GpVOSEvent *evt = evtQueue->GetNext())
{
TranslateVOSEvent(evt, timestamp, plQueue);