Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions source/MRViewer/MRViewer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2847,6 +2847,7 @@ void Viewer::updatePixelRatio_()
int winWidth, winHeight;
glfwGetWindowSize( window, &winWidth, &winHeight );
pixelRatio = float( framebufferSize.x ) / float( winWidth );
spdlog::info( "*************************************************** updatePixelRatio_ = {}", pixelRatio );
}

int Viewer::getRequiredMSAA_( bool sceneTextureOn, bool forSceneTexture ) const
Expand Down
2 changes: 1 addition & 1 deletion source/mrviewerpy/MRPythonViewer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ MR_ADD_PYTHON_CUSTOM_DEF( mrviewerpy, Viewer, [] ( pybind11::module_& m )
MR::pythonAppendOrRun( [&viewer, x, y]
{
glfwSetCursorPos( viewer.window, double( x ) / viewer.pixelRatio, double( y ) / viewer.pixelRatio );

std::cout << "mouseMove " << x << " " << y << " ratio " << viewer.pixelRatio << "\n";
// On Windows `glfwSetCursorPos()` automatically sends the `mouseMove()` event. On Linux it doesn't, so we need this:
auto eventCall = [&viewer, x, y]{ viewer.mouseMove( x, y ); };
viewer.emplaceEvent( "simulatedMouseMove", eventCall, false );
Expand Down
Loading