mirror of
https://github.com/elasota/Aerofoil.git
synced 2025-12-14 12:09:36 +00:00
Fix display resolution desynchronizing with auto-position
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
#include "MenuManager.h"
|
||||
#include "IGpDisplayDriver.h"
|
||||
#include "IGpSystemServices.h"
|
||||
#include "Vec2i.h"
|
||||
#include "WindowManager.h"
|
||||
|
||||
#include "PLDrivers.h"
|
||||
@@ -420,11 +421,9 @@ void HandleDepthSwitching (void)
|
||||
|
||||
void GetDeviceRect(Rect *rect)
|
||||
{
|
||||
unsigned int width;
|
||||
unsigned int height;
|
||||
PLDrivers::GetDisplayDriver()->GetDisplayResolution(&width, &height);
|
||||
PortabilityLayer::Vec2i displayResolution = PortabilityLayer::WindowManager::GetInstance()->GetDisplayResolution();
|
||||
|
||||
SetRect(rect, 0, 0, static_cast<short>(width), static_cast<short>(height));
|
||||
SetRect(rect, 0, 0, static_cast<short>(displayResolution.m_x), static_cast<short>(displayResolution.m_y));
|
||||
}
|
||||
|
||||
Boolean AreWeColorOrGrayscale()
|
||||
|
||||
Reference in New Issue
Block a user