G
YouTube TikTok Games
Skip to content

Windowing on Windows #47

Open
Open

Description

@agoujot

Under Windows, open_graph dimensions do not take into account the height of the title bar, meaning it takes some default 17px from the top of the window things (I don't know exactly what), which means that the window is cropped at the top and at the right, which has to be manually compensated.
Also, from OCaml we cannot see the actual height, which is customizable, but the C code could.

On another note, resize_window is not implemented, and it certainly would be great to have it (else as of now the window always has the size defined in the open_graph).

Activity

  1. nojb commented on Oct 12, 2024

    @nojb
    Contributor

    Dear @agoujot, thanks for the bug report!

    I was able to reproduce both of your issues. I tried a quick fix over at

    master...nojb:graphics:fix_win32

    You may want to try it and confirm whether it works for you.

    Since this project is not actively developed, am not sure how likely it is that these fixes (if they are indeed correct) will be integrated. But in any case, it would be great if you could confirm whether they fix things on your side.

  2. agoujot commented on Oct 12, 2024

    @agoujot
    Author

    Thank you for answering!
    Though I'm not much of a C programmer, it looks good to me.
    (It will take me a bit of time to test it, as I'm on linux and it happened as I tried to make my code work on someone else's windows computer.)
    About graphics' support, do you know why it was deprecated, as it's pretty good and I didn't find alternatives as good, despite graphics' being very old and nearly unmaintained?

  3. xavierleroy commented on Oct 15, 2024

    @xavierleroy
    Contributor

    About graphics' support, do you know why it was deprecated, as it's pretty good and I didn't find alternatives as good, despite graphics' being very old and nearly unmaintained?

    The Graphics library is not deprecated properly speaking, just not actively developed and barely maintained because nobody seems to care enough about it to contribute actual code to improve it.

    Concerning alternatives, the OCaml-SDL bindings look rather popular, if only because there are several of them...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions