Index: ps/trunk/libraries/osx/build-osx-libs.sh =================================================================== --- ps/trunk/libraries/osx/build-osx-libs.sh +++ ps/trunk/libraries/osx/build-osx-libs.sh @@ -28,7 +28,7 @@ # NOTE: remember to also update LIB_URL below when changing version BOOST_VERSION="boost_1_74_0" # NOTE: remember to also update LIB_URL below when changing version -WXWIDGETS_VERSION="wxWidgets-3.0.5.1" +WXWIDGETS_VERSION="wxWidgets-3.1.4" # libpng was included as part of X11 but that's removed from Mountain Lion # (also the Snow Leopard version was ancient 1.2) PNG_VERSION="libpng-1.6.36" @@ -393,7 +393,7 @@ LIB_VERSION="${WXWIDGETS_VERSION}" LIB_ARCHIVE="$LIB_VERSION.tar.bz2" LIB_DIRECTORY="$LIB_VERSION" -LIB_URL="http://github.com/wxWidgets/wxWidgets/releases/download/v3.0.5.1/" +LIB_URL="http://github.com/wxWidgets/wxWidgets/releases/download/v3.1.4/" mkdir -p wxwidgets pushd wxwidgets > /dev/null Index: ps/trunk/source/tools/atlas/AtlasUI/CustomControls/Canvas/Canvas.cpp =================================================================== --- ps/trunk/source/tools/atlas/AtlasUI/CustomControls/Canvas/Canvas.cpp +++ ps/trunk/source/tools/atlas/AtlasUI/CustomControls/Canvas/Canvas.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2012 Wildfire Games. +/* Copyright (C) 2021 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -40,7 +40,9 @@ // Be careful not to send 'resize' messages to the game before we've // told it that this canvas exists if (! m_SuppressResize) - POST_MESSAGE(ResizeScreen, (GetClientSize().GetWidth(), GetClientSize().GetHeight())); + POST_MESSAGE(ResizeScreen, ( + GetClientSize().GetWidth() * GetContentScaleFactor(), + GetClientSize().GetHeight() * GetContentScaleFactor())); // TODO: fix flashing } @@ -64,6 +66,9 @@ void Canvas::OnMouse(wxMouseEvent& evt) { + evt.SetX(evt.GetX() * GetContentScaleFactor()); + evt.SetY(evt.GetY() * GetContentScaleFactor()); + // Capture on button-down, so we can respond even when the mouse // moves off the window if (!m_MouseCaptured && evt.ButtonDown()) Index: ps/trunk/source/tools/atlas/AtlasUI/ScenarioEditor/ScenarioEditor.cpp =================================================================== --- ps/trunk/source/tools/atlas/AtlasUI/ScenarioEditor/ScenarioEditor.cpp +++ ps/trunk/source/tools/atlas/AtlasUI/ScenarioEditor/ScenarioEditor.cpp @@ -592,7 +592,8 @@ POST_MESSAGE(InitSDL, ()); POST_MESSAGE(SetCanvas, (static_cast(canvas), - canvas->GetClientSize().GetWidth(), canvas->GetClientSize().GetHeight())); + canvas->GetClientSize().GetWidth() * canvas->GetContentScaleFactor(), + canvas->GetClientSize().GetHeight() * canvas->GetContentScaleFactor())); POST_MESSAGE(InitGraphics, ());