Render GUI correctly on retina screens (#834)

This commit is contained in:
Emil Axelsson
2019-04-27 15:45:36 +02:00
committed by Alexander Bock
parent 1d50a88fc0
commit 6a6db9aa78
3 changed files with 18 additions and 7 deletions

View File

@@ -194,7 +194,10 @@ void CefWebGuiModule::internalInitialize(const ghoul::Dictionary& configuration)
if (isGuiWindow && isMaster && _instance) {
if (global::windowDelegate.windowHasResized()) {
_instance->reshape(global::windowDelegate.currentWindowSize());
_instance->reshape(static_cast<glm::ivec2>(
static_cast<glm::vec2>(global::windowDelegate.currentWindowSize()) *
global::windowDelegate.dpiScaling()
));
}
if (_visible) {
_instance->draw();