I recently solved the problem of screen jitter after game interface scaling. I will share it with you.
Our company's games experienced significant image jitter after the interface was scaled to 75%, 50%, 40%, and 25%. After the assistance and efforts of our colleagues, we understood the ddraw scaling rule, in general, the process should be: Taking 50% as an example, we should take a column for each column of the image, and then remove a column. This is also true for the implementation of rules in the analogy to the row, for example, if there are 10 columns, ddraw will take 1, 3, 5, 7, and 9 from a large BLT to a small screen, and the corresponding even numbers will be removed, if we move the canvas three pixels, the pixels displayed on the screen will become even columns, causing the screen to flash. The corresponding solution is actually very simple, you only need to ensure that the screen is a multiple of 2. Of course, this situation may cause certain exceptions to the character. Specifically, if the character moves an odd number of pixels at a time, for example, if it is 3 pixels, in order to ensure screen flickering, We need to manually adjust the shift of the canvas, then the position of the character will have a pixel offset. If the scaling ratio is not well selected, the offset is more obvious.