Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Ctrl + left click Centre view on ship depot opens a viewport centered on a power station #11577

Closed
SamuXarick opened this issue Dec 12, 2023 · 1 comment

Comments

@SamuXarick
Copy link
Contributor

Version of OpenTTD

20231211-master-g0a8bcdd344

Expected result

Open a viewport centered on ship depot.

Actual result

Opens a viewport centered on a power station.

Steps to reproduce

  1. Start a new game
  2. Build a ship depot
  3. Click on it
  4. Ctrl-click on Centre view button
@glx22
Copy link
Contributor

glx22 commented Dec 13, 2023

I can confirm it on windows, but it's fine with wsl.

And git bisect says it started with #11191.

glx22 added a commit to glx22/OpenTTD that referenced this issue Dec 13, 2023
PeterN added a commit to PeterN/OpenTTD that referenced this issue Dec 13, 2023
ExtraViewportWindow calls IninitializeViewport() with focus as 0, which is invalid as focus should be either a TileIndex or a VehicleID.

Instead, pass the tile, and let InitializeViewport() set handle all the coordinates.
PeterN added a commit to PeterN/OpenTTD that referenced this issue Dec 13, 2023
ExtraViewportWindow calls IninitializeViewport() with focus as 0, which is invalid as focus should be either a TileIndex or a VehicleID.

Instead, pass the tile, and let InitializeViewport() set handle all the coordinates.
PeterN added a commit to PeterN/OpenTTD that referenced this issue Dec 13, 2023
ExtraViewportWindow calls IninitializeViewport() with focus as 0, which is invalid as focus should be either a TileIndex or a VehicleID.

Instead, pass the tile, and let InitializeViewport() set handle all the coordinates.
@PeterN PeterN closed this as completed in 6c5aeae Dec 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants