ValveSoftware / Proton

Compatibility tool for Steam Play based on Wine and additional components
Other
24.53k stars 1.07k forks source link

Stretched scaling in Jazz Jackrabbit 2 in windowed mode (fshack) #5798

Open daniel-j opened 2 years ago

daniel-j commented 2 years ago

When playing Jazz Jackrabbit 2 in windowed mode, Proton in gamescope crops away the titlebar, menubar and border, which is great. But then it gets the scaling/cropped window size wrong, and it stretches the game pixels. For example when running the game at 640x480 it gets stretched to 653x531. Here is a screenshot with integer scaling, to prove that it is not scaling properly (tested on Steam Deck):

20220425225658_1

Screenshot from the game: Jazz2-EASTER1-001

For reference, when running JJ2 on a GNOME desktop, you can see the menus and border: Screenshot from 2022-04-25 22-59-11

The game has a fullscreen (DirectDraw) mode, but it seems to draw more power on the Deck so I would prefer to run it windowed (and fshack crops and scales it up with gamescope).

Proton logfile with WINEDEBUG=+fshack,+x11drv: steam-10702214918549012480.log

Some notable lines:

013c:trace:x11drv:X11DRV_create_win_data win 0x20082/1600003 window (0,0)-(653,531) whole (0,0)-(653,531) client (0,0)-(653,531)
013c:trace:fshack:fs_hack_monitor_from_rect rect (0,0)-(653,531)
013c:trace:fshack:fs_hack_monitor_from_hwnd hwnd 0x20082 rect (0,0)-(653,531)

Jazz Jackrabbit 2 TSF running with the Plus patch, installed from GOG, running on proton-7.0-2.

I first posted an issue to gamescope, but I think I found out that it is fshack inside Proton that's cause it, or gamescope getting the wrong size. https://github.com/Plagman/gamescope/issues/475

daniel-j commented 2 years ago

The game's fullscreen mode doesn't work perfectly either. When going from the menus into a level, the top of the screen gets cut off. The fix is to go to video settings and apply the video mode, or toggle windowed and fullscreen mode. Screenshot with integer scaling: 20220426165504_1 And sometimes it doesn't fill the screen (screenshot with FSR mode): 20220426165345_1