Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: 0 fullscreen modes available on 14inch macbook pro  (Read 7618 times)

0 Members and 4 Guests are viewing this topic.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11034
    • View Profile
    • development blog
    • Email
Re: 0 fullscreen modes available on 14inch macbook pro
« Reply #15 on: December 12, 2022, 11:27:25 am »
Checking the specs it seems like 3456x2234 is the native resolution of you mac book: https://support.apple.com/kb/SP858?locale=en_US#:~:text=3456%2Dby%2D2234%20native%20resolution

Which means you may actually be using dome DPI scaling to get a different resolution.
I don't know how that's configured on macOS exactly, but do you have DPI scaling enabled?
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

md81544

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: 0 fullscreen modes available on 14inch macbook pro
« Reply #16 on: December 12, 2022, 11:49:45 am »
Those specs you quote are for the macbook pro (which is what the OP is using). The specs for my M2 air are here: https://www.apple.com/uk/macbook-air-m2/specs/  and confirms 2560x1664 native resolution.

I don't have DPI scaling enabled as far as I am aware. The only option in settings seems to be some vague "Larger Text", "Default", or "More Space" which scales everything up or down. I tried all of them when I initially saw the problem and got the segfault that the OP initially reported on all of those settings.
« Last Edit: December 12, 2022, 04:16:00 pm by md81544 »

md81544

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: 0 fullscreen modes available on 14inch macbook pro
« Reply #17 on: December 13, 2022, 07:42:20 am »
So if I comment out the line here

https://github.com/SFML/SFML/blob/82b48a7520a2eb83576ec16d68ff9ea6d3d5d5bd/src/SFML/Window/OSX/cg_sf_conversion.mm#L94

then the modes which come back from getFullscreenModes() look more like what I'd expect for my Macbook Air M2:

Mode #0: 2560x1664 - 32 bpp
Mode #1: 2560x1600 - 32 bpp
Mode #2: 2048x1332 - 32 bpp
Mode #3: 2048x1280 - 32 bpp
Mode #4: 1920x1200 - 32 bpp


So the issue is possibly related to whether pixels or points are returned from CGDisplayModeGetWidth() etc ?

Edit:  I've just been looking at this thread https://stackoverflow.com/questions/42024942/cgdisplaymodegetwidth-height-sometimes-returns-pixels-sometimes-points

I wonder whether the comment "The scaling factor for all modes is not the same. Some are 1:1, some are 2:1. A mode of size 1680x1050 points does not imply a pixel size of 3360x2100" is relevant?
« Last Edit: December 13, 2022, 01:55:50 pm by md81544 »

md81544

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: 0 fullscreen modes available on 14inch macbook pro
« Reply #18 on: December 15, 2022, 06:12:38 am »
As this appears to be a bug, shall I summarise this in a github issue?

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11034
    • View Profile
    • development blog
    • Email
Re: 0 fullscreen modes available on 14inch macbook pro
« Reply #19 on: December 15, 2022, 08:26:43 am »
Yes, please do so! Thanks for investigating :)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

md81544

  • Newbie
  • *
  • Posts: 12
    • View Profile