SDL2 How to position a window on a second monitor?

后端 未结 3 1560
独厮守ぢ
独厮守ぢ 2021-02-15 16:39

I am using SDL_SetWindowPosition to position my window. Can I use this function to position my window on another monitor?

UPDATE

Us

3条回答
  •  执笔经年
    2021-02-15 17:26

    DPI scaling issue ("will not return the correct monitor positions when the text size is changed")

    It's a known issue with SDL2 (I encountered it in those versions: 2.0.6, 2.0.7, 2.0.8, probably the older versions have this issue as well).

    Solutions:

    1) Use manifest file and set there:

    True/PM
    

    (you need to include the manifest file to your app distribution)

    2) Try SetProcessDPIAware().

提交回复
热议问题