The International Simutrans Forum

Development => Bug Reports => Topic started by: Yona-TYT on October 01, 2022, 10:26:40 PM

Title: Dragging cursor on minimap did not respond correctly
Post by: Yona-TYT on October 01, 2022, 10:26:40 PM

ArchLinux SDL2, r10763
The dragging problem on the minimap is still present when you try to make circular movements with the secondary click.

Please watch the following video:
Title: Re: Dragging cursor on minimap did not respond correctly
Post by: Yona-TYT on October 30, 2022, 07:35:16 AM
Excuse me for being so insistent. I think this error was overlooked.

As a comparative data I did a test with an earlier version of simutrans and the difference in displacement is noticeable.

Watch Video:
Title: Re: Dragging cursor on minimap did not respond correctly
Post by: prissi on October 30, 2022, 10:51:03 AM
So what did you do for this error?

The SDL2 version I am testing works fine, the rectangle is a rectangle and the clicking works as intended.

So what is your resolution, what version of SDL2? Windowed or full screen? Wayland or X or framebuffer?
Title: Re: Dragging cursor on minimap did not respond correctly
Post by: Yona-TYT on October 30, 2022, 02:34:24 PM
I am using arch linx with gnome in wayland
SDL v2.24.1

It happens with the normal window, I still haven't tried full screen or forcing wayland in SDL
Title: Re: Dragging cursor on minimap did not respond correctly
Post by: Yona-TYT on October 30, 2022, 08:32:07 PM
Forcing SDL on Wayland "SDL_VIDEODRIVER=wayland simutrans" the behavior is the same.
Title: Re: Dragging cursor on minimap did not respond correctly
Post by: prissi on October 31, 2022, 06:36:27 AM
Still what do you mean with secondary click? Maybe I can reproduce it on Windows SDL2 too, but I need to get better instruction what the secondary click means.
Title: Re: Dragging cursor on minimap did not respond correctly
Post by: Yona-TYT on October 31, 2022, 04:26:20 PM
Quote from: prissi on October 31, 2022, 06:36:27 AMStill what do you mean with secondary click? Maybe I can reproduce it on Windows SDL2 too, but I need to get better instruction what the secondary click means.
I am referring to the event that scrolls the minimap view without changing the position on the game map.

This event is fired by holding and dragging the right mouse click on the minimap.

Note: Youtube videos seem to be not working well in the forum (check this).
Title: Re: Dragging cursor on minimap did not respond correctly
Post by: prissi on October 31, 2022, 11:56:24 PM
So you just hold and drag the right mouse button? Then the yellow rectangle should not move and just the map is minimap position is dragged.

Only the left button moves the external view.

Also, I could get a non square rectangle with extreme zoom out (1:11) but not under normal circumstances. Could you just start simutrans with SDL2 and -log -debug 5 until the oak selection screen appears, and just post the result?
Title: Re: Dragging cursor on minimap did not respond correctly
Post by: Yona-TYT on November 01, 2022, 12:42:23 PM
Quote from: prissi on October 31, 2022, 11:56:24 PMSo you just hold and drag the right mouse button? Then the yellow rectangle should not move and just the map is minimap position is dragged.
Exakt !. 8)


The scroll speed seems to be broken here, as setting the "Scroll Speed" (Display Settings) to a low value has no effect.


Quote from: prissi on October 31, 2022, 11:56:24 PMAlso, I could get a non square rectangle with extreme zoom out (1:11) but not under normal circumstances. Could you just start simutrans with SDL2 and -log -debug 5 until the oak selection screen appears, and just post the result?
until the oak selection screen ? ??? ... Hopefully this log is of some use: debug.zip
Title: Re: Dragging cursor on minimap did not respond correctly
Post by: prissi on November 01, 2022, 01:00:37 PM
That fooks all fine.
Title: Re: Dragging cursor on minimap did not respond correctly
Post by: Dwachs on November 01, 2022, 03:17:37 PM
The rectangle in the minimap is distorted if the view is on very rough terrain: there is some code that calculates the the coordinates if visible tile in the four corners of the screen to approximate the current viewport.