Skip to content

[Feature Request] Add a property to map from SDL_DisplayID to HMONITOR on Windows #14488

@madewokherd

Description

@madewokherd

Yargis - Space Melee, a Windows XNA game, uses GraphicsAdapter.get_MonitorHandle(). In Proton, with Wine Mono's FNA-based replacement for XNA, it crashes with a NotImplementedException. On a single-monitor system, I confirmed that hacking it to return an HMONITOR for the primary monitor gets the game further.

Adding this capability to Wine Mono requires mapping from an SDL_DisplayID to HMONITOR. One could attempt to do this using the display name, but that seems complicated. Maybe SDL_GetDisplayBounds combined with MonitorFromPoint would work, but I'm not sure if I can assume that monitors do not overlap.

A property, similar to SDL_PROP_DISPLAY_WAYLAND_WL_OUTPUT_POINTER, but available on Windows and mapping to HMONITOR, seems like it would be cleaner.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions