mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-03-16 18:40:35 -05:00
Feature/globals handling (#1352)
* Cleaner handling of global state * Prevent Lua memory corruption (closes #982) * Initialize glfw first thing to prevent weird joystick loading bug during startup
This commit is contained in:
@@ -75,8 +75,8 @@ BrowserInstance::~BrowserInstance() {
|
||||
|
||||
void BrowserInstance::initialize() {
|
||||
reshape(static_cast<glm::ivec2>(
|
||||
static_cast<glm::vec2>(global::windowDelegate.currentSubwindowSize()) *
|
||||
global::windowDelegate.dpiScaling()
|
||||
static_cast<glm::vec2>(global::windowDelegate->currentSubwindowSize()) *
|
||||
global::windowDelegate->dpiScaling()
|
||||
));
|
||||
_isInitialized = true;
|
||||
_shouldReshape = true;
|
||||
@@ -170,7 +170,7 @@ bool BrowserInstance::sendMouseWheelEvent(const CefMouseEvent& event,
|
||||
}
|
||||
|
||||
void BrowserInstance::setZoom(float ratio) {
|
||||
const float dpiScaling = global::windowDelegate.dpiScaling().x;
|
||||
const float dpiScaling = global::windowDelegate->dpiScaling().x;
|
||||
|
||||
// Zooming in CEF is non-linear according to this:
|
||||
// https://www.magpcss.org/ceforum/viewtopic.php?f=6&t=11491
|
||||
|
||||
Reference in New Issue
Block a user