Fix alt-enter

This commit is contained in:
elasota
2020-04-06 03:34:31 -04:00
parent ffd9d9cc1f
commit 0335dd7786
7 changed files with 40 additions and 27 deletions

View File

@@ -25,7 +25,7 @@ public:
void PL_HostFontHandler_SetInstance(PortabilityLayer::HostFontHandler *instance) override;
void PL_HostVOSEventQueue_SetInstance(PortabilityLayer::HostVOSEventQueue *instance) override;
void PL_InstallHostSuspendHook(PortabilityLayer::HostSuspendHook_t hook, void *context) override;
void PL_AdjustRequestedResolution(unsigned int &width, unsigned int &height) override;
bool PL_AdjustRequestedResolution(unsigned int &width, unsigned int &height) override;
};
@@ -80,13 +80,20 @@ void GpAppInterfaceImpl::PL_InstallHostSuspendHook(PortabilityLayer::HostSuspend
PortabilityLayer::InstallHostSuspendHook(hook, context);
}
void GpAppInterfaceImpl::PL_AdjustRequestedResolution(unsigned int &width, unsigned int &height)
bool GpAppInterfaceImpl::PL_AdjustRequestedResolution(unsigned int &width, unsigned int &height)
{
PortabilityLayer::DisplayDeviceManager::IResolutionChangeHandler *handler = PortabilityLayer::DisplayDeviceManager::GetInstance()->GetResolutionChangeHandler();
if (!handler)
return false;
uint32_t w32 = width;
uint32_t h32 = height;
PortabilityLayer::DisplayDeviceManager::GetInstance()->GetResolutionChangeHandler()->AdjustRequestedResolution(w32, h32);
handler->AdjustRequestedResolution(w32, h32);
width = w32;
height = h32;
return true;
}