mirror of
https://github.com/elasota/Aerofoil.git
synced 2025-09-23 06:53:43 +00:00
Code cleanup, move a lot of "Host" APIs to GpCommon
This commit is contained in:
@@ -8,18 +8,13 @@
|
||||
|
||||
#include "WindowDef.h"
|
||||
#include "BitmapImage.h"
|
||||
#include "PLApplication.h"
|
||||
#include "PLKeyEncoding.h"
|
||||
#include "PLStandardColors.h"
|
||||
#include "PLSysCalls.h"
|
||||
#include "Externs.h"
|
||||
#include "Environ.h"
|
||||
#include "FontFamily.h"
|
||||
#include "GpRenderedFontMetrics.h"
|
||||
#include "HostDisplayDriver.h"
|
||||
#include "HostSystemServices.h"
|
||||
#include "HostThreadEvent.h"
|
||||
#include "IGpThreadEvent.h"
|
||||
#include "IGpDisplayDriver.h"
|
||||
#include "IGpSystemServices.h"
|
||||
#include "GpIOStream.h"
|
||||
#include "House.h"
|
||||
#include "MainMenuUI.h"
|
||||
@@ -34,6 +29,12 @@
|
||||
#include "WindowManager.h"
|
||||
#include "WorkerThread.h"
|
||||
|
||||
#include "PLApplication.h"
|
||||
#include "PLDrivers.h"
|
||||
#include "PLKeyEncoding.h"
|
||||
#include "PLStandardColors.h"
|
||||
#include "PLSysCalls.h"
|
||||
|
||||
#include <atomic>
|
||||
|
||||
|
||||
@@ -247,7 +248,7 @@ void ReadInPrefs (void)
|
||||
doPrettyMap = false;
|
||||
doComplainDialogs = true;
|
||||
|
||||
IGpDisplayDriver *displayDriver = PortabilityLayer::HostDisplayDriver::GetInstance();
|
||||
IGpDisplayDriver *displayDriver = PLDrivers::GetDisplayDriver();
|
||||
if (!displayDriver->IsFullScreen())
|
||||
displayDriver->RequestToggleFullScreen(0);
|
||||
|
||||
@@ -496,7 +497,7 @@ struct PreloadFontSpec
|
||||
|
||||
struct PreloadFontWorkSlot
|
||||
{
|
||||
PortabilityLayer::HostThreadEvent *m_completedEvent;
|
||||
IGpThreadEvent *m_completedEvent;
|
||||
PortabilityLayer::WorkerThread *m_workerThread;
|
||||
std::atomic<int> m_singleJobCompleted;
|
||||
const PreloadFontSpec *m_spec;
|
||||
@@ -581,7 +582,7 @@ void PreloadFonts()
|
||||
// but we can do this to unclog the render thread.
|
||||
PreloadFontWorkSlot slot;
|
||||
slot.m_workerThread = PortabilityLayer::WorkerThread::Create();
|
||||
slot.m_completedEvent = PortabilityLayer::HostSystemServices::GetInstance()->CreateThreadEvent(true, false);
|
||||
slot.m_completedEvent = PLDrivers::GetSystemServices()->CreateThreadEvent(true, false);
|
||||
|
||||
while (completedSpecs < numFontSpecs)
|
||||
{
|
||||
|
Reference in New Issue
Block a user