Menu

#94 Incorrect scaling on (either multi or non-16:9) monitors

None
closed
nobody
None
5
2023-05-12
2023-01-23
No

I have a multimonitor configuration, 1920x1080, 1600x1200, 1600x1200. The game uses incorrect scaling when run on a second monitor, it seems like it's using 1920x1080 resolution. Screenshot attached.

PS. It would be nice to have scalable windowed mode without fixed resolution. It looks like the menu screen already works correctly, but the game should be fixed.

1 Attachments

Discussion

  • Michael Speck

    Michael Speck - 2023-01-28

    I can you please sent the log output when run from console? Because the resolution is set once and shouldn't change when starting the game, I would like to see which resolution was picked. Or what exactly to you mean by "the menu screen already works"? Can you sent a srceenshot for this too please?

     
  • Dmitry Marakasov

    (Started on the second monitor)

    lbreakouthd% lbreakouthd
    lbreakouthd 1.1.1
    Copyright 2018-2022 Michael Speck
    Published under GNU GPL
    ---
    Loading configuration /home/marakasov/.lbreakouthd/lbreakouthd.conf
    Loading hiscores /var/games/lbreakouthd/lbreakouthd.hscr
    Initializing SDL
    Mixer opened (16 channels, 1024 buf size)
    No game controller found...
    Initializing View (Theme=Standard, Resolution=0)
    Using fullscreen resolution 1920x1080
    Scale factor x100: 225
    Brick screen size: 90x45
    Creating main window with 1920x1080, fullscreen=1
    Loading theme /usr/local/share/lbreakouthd/themes/Standard
    Added player Michael
    LBreakoutHD v1.00: 37 levels
    Game saved to /home/marakasov/.lbreakouthd/lbreakouthd.sav
    Mixer closed
    Finalizing SDL
    Hiscores saved to /var/games/lbreakouthd/lbreakouthd.hscr
    Configuration saved to /home/marakasov/.lbreakouthd/lbreakouthd.conf
    

    xrandr output for clarity

    % xrandr
    Screen 0: minimum 320 x 200, current 5120 x 1200, maximum 16384 x 16384
    eDP-1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 309mm x 174mm
       1920x1080     60.02*+  59.96    59.93    47.99  
       1680x1050     59.95    59.88  
       1400x1050     59.98  
       1600x900      59.95    59.82  
       1280x1024     60.02  
       1400x900      59.96    59.88  
       1280x960      60.00  
       1368x768      59.88    59.85  
       1280x800      59.81    59.91  
       1280x720      59.86    59.74  
       1024x768      60.00  
       1024x576      59.90    59.82  
       960x540       59.63    59.82  
       800x600       60.32    56.25  
       864x486       59.92    59.57  
       640x480       59.94  
       720x405       59.51    58.99  
       640x360       59.84    59.32  
    HDMI-1 disconnected (normal left inverted right x axis y axis)
    DP-1 disconnected (normal left inverted right x axis y axis)
    HDMI-2 disconnected (normal left inverted right x axis y axis)
    DP-1-1 connected 1600x1200+1920+0 (normal left inverted right x axis y axis) 367mm x 275mm
       1600x1200     60.00*+
       1280x1024     75.02    60.02  
       1152x864      75.00  
       1024x768      75.03    60.00  
       800x600       75.00    60.32  
       640x480       75.00    59.94  
       720x400       70.08  
    DP-1-2 connected 1600x1200+3520+0 (normal left inverted right x axis y axis) 367mm x 275mm
       1600x1200     60.00*+
       1280x1024     75.02    60.02  
       1152x864      75.00  
       1024x768      75.03    60.00  
       800x600       75.00    60.32  
       640x480       75.00    59.94  
       720x400       70.08  
    DP-1-3 disconnected (normal left inverted right x axis y axis)
    

    Or what exactly to you mean by "the menu screen already works"? Can you sent a srceenshot for this too please?

    Well that turned out not to be quite true. Attached are screenshots of menu as when the game starts on 2nd monitor, and how all 3 monitors look when I turn it into floating window and resize it. You can see that the background image is scaled onto whole window, but the version text is aligned as if the resolution was fixed 1920x1080. If the text was aligned according to real window resolution, the menu would correctly support any resolution. Would be great to support that in the game too.

     

    Last edit: Dmitry Marakasov 2023-01-30
  • Michael Speck

    Michael Speck - 2023-02-04

    Ok, still weird the menu scales the background because it shouldn't but anyways: Can you please checkout the latest SVN commit and try the following: Switch to window mode, move to a 4:3 monitor and reapply fullscreen. Now it should properly work and show the game 16:9 with black bars top and bottom. Problem was, it always chose display 0 settings breaking other types of second monitors. On reinitializing it will now use the correct one. It still won't work for the initial window (so next game start you'd have to do the same again) but once you can confirm it partially works, I can fix this too so please let me know.

    About your second request: LBreakoutHD is a 16:9 remake. It will work on 4:3 but just in the way you will see. Scaling arbitrarily won't work because it will break gameplay due the way input works. So for that reason the window resolutions are limited to "useful" 16:9 resolutions which also keeps the menu simple.

     
    • Dmitry Marakasov

      Well it does seem to work the way you describe.

      % lbreakouthd 
      lbreakouthd 1.1.1
      Copyright 2018-2022 Michael Speck
      Published under GNU GPL
      ---
      Configuration directory /home/marakasov/.lbreakouthd not found, creating.
      Loading configuration /home/marakasov/.lbreakouthd/lbreakouthd.conf
      ERROR: tools.cpp:52: FileParser(): Could not open /home/marakasov/.lbreakouthd/lbreakouthd.conf
      Loading hiscores /var/games/lbreakouthd/lbreakouthd.hscr
      Initializing SDL
      Mixer opened (16 channels, 1024 buf size)
      No game controller found...
      Initializing View (Theme=Standard, Resolution=0)
      Using display 0
      Using fullscreen resolution 1920x1080
      Scale factor x100: 225
      Brick screen size: 90x45
      Creating main window with 1920x1080, fullscreen=1
      Loading theme /usr/local/share/lbreakouthd/themes/Standard
      Initializing View (Theme=Standard, Resolution=768)
      Using display 0
      Using window resolution 1365x768
      Scale factor x100: 160
      Brick screen size: 64x32
      Creating main window with 1365x768, fullscreen=0
      Loading theme /usr/local/share/lbreakouthd/themes/Standard
      Initializing View (Theme=Standard, Resolution=0)
      Using display 1
      Fullscreen resolution not 16:9! Using 1600x900
      Scale factor x100: 185
      Brick screen size: 74x37
      Creating main window with 1600x900, fullscreen=1
      Loading theme /usr/local/share/lbreakouthd/themes/Standard
      Added player Michael
      LBreakoutHD v1.00: 37 levels
      Game saved to /home/marakasov/.lbreakouthd/lbreakouthd.sav
      
       
      • Michael Speck

        Michael Speck - 2023-02-17

        Ok, I've added something for the first start on multi-display setups. So now it should straight up find the correct display to open the actual window at. Resizing and moving to another display while the program is running should still work, of course. Can you please test it? Thanks!

         
  • Oliver Kellogg

    Oliver Kellogg - 2023-02-04

    I had the similar problem but much more pronounced, and not on a second monitor but on my primary (using current OpenSuSE Tumbleweed x86_64).
    In fullscreen mode approx. the upper half of the screen was black and the gameplay area shifted down (by as much as the top black area) to be unusable. Similar strangeness on the other (non fullscreen) modes.
    So I tried building from the svn trunk as you suggested and found that the "configure" script was not available in the trunk. So I ran aclocal but that gave

    ERROR: Use of AM_GNU_GETTEXT without [external] argument is no longer supported.
    

    Could you provide the steps how you generated the configure script in trunk?
    Anyway, after some fiddling around in autohell I somehow was able to get the configure script generated.
    And in fact, your trunk patch did fix the problem for me!

     
    • Michael Speck

      Michael Speck - 2023-02-17

      Steps should be aclocal; autoconf; automake
      But I don't get this error. What does aclocal --version returns as version? I wonder why this happens because the macro m4/gettext.m4 in the package should be the same and that clearly allows no arguments which defaults to 'no-libtool' Or did you somehow replace gettext.m4 with a newer version?

       
  • Michael Speck

    Michael Speck - 2023-05-12
    • status: open --> closed
    • Group: -->
     

Log in to post a comment.

MongoDB Logo MongoDB