Skip to content

Commit

Permalink
C4Viewport: Fix Linux build errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Fulgen301 committed Apr 15, 2024
1 parent f766ef5 commit 36259f6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/C4Viewport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@ gboolean C4ViewportWindow::OnButtonPressStatic(GtkWidget *widget, GdkEventButton
switch (event->button)
{
case 1:
Console.EditCursor.LeftButtonDown(event->state & MK_CONTROL);
Console.EditCursor.LeftButtonDown(window->cvp->GetViewSection(), event->state & MK_CONTROL);
break;
case 3:
Console.EditCursor.RightButtonDown(event->state & MK_CONTROL);
Expand Down Expand Up @@ -577,10 +577,10 @@ gboolean C4ViewportWindow::OnButtonReleaseStatic(GtkWidget *widget, GdkEventButt
switch (event->button)
{
case 1:
Console.EditCursor.LeftButtonUp();
Console.EditCursor.LeftButtonUp(window->cvp->GetViewSection());
break;
case 2:
Console.EditCursor.MiddleButtonUp();
Console.EditCursor.MiddleButtonUp(window->cvp->GetViewSection());
break;
case 3:
Console.EditCursor.RightButtonUp();
Expand All @@ -603,7 +603,7 @@ gboolean C4ViewportWindow::OnMotionNotifyStatic(GtkWidget *widget, GdkEventMotio
{
const auto scale = Application.GetScale();

Console.EditCursor.Move(window->cvp->ViewX + static_cast<int32_t>(event->x / scale), window->cvp->ViewY + static_cast<int32_t>(event->y / scale), event->state);
Console.EditCursor.Move(window->cvp->GetViewSection(), window->cvp->ViewX + static_cast<int32_t>(event->x / scale), window->cvp->ViewY + static_cast<int32_t>(event->y / scale), event->state);
}

return TRUE;
Expand Down

0 comments on commit 36259f6

Please sign in to comment.