Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image doesn't fit to the screen if the game resolution isn't set to native resolution #8

Open
rea987 opened this issue Dec 29, 2018 · 6 comments
Labels
bug Something isn't working

Comments

@rea987
Copy link

rea987 commented Dec 29, 2018

Proton with Gallium Nine patches fails to fit and/or stretch image to the screen if the game's resolution isn't set to native resolution. That applies to all Direct3D 9 games when Gallium Nine is active.

Company of Heroes in 1024x768 resolution on 1600x900 system:
coh_1024x768

Company of Heroes in 1600x900 resolution on 1600x900 system:
coh_1600x900

When the game's resolution is below the native resolution and doesn't fit the screen the screen as a result, navigating with mouse becomes harder since it cannot click menus as it supposed to. The workaround for this is returning to desktop with Alt+Tab, then get back to the game, finally positioning of the cursor becomes reliable.

Installed SDL packages on my system:

$ dpkg --get-selections | grep sdl
libsdl-image1.2:amd64				install
libsdl-image1.2:i386				install
libsdl-sound1.2:amd64				install
libsdl-stretch-0-3:amd64			install
libsdl-stretch-0-3:i386				install
libsdl-ttf2.0-0:amd64				install
libsdl-ttf2.0-0:i386				install
libsdl1.2debian:amd64				install
libsdl1.2debian:i386				install
libsdl2-2.0-0:amd64				install
libsdl2-2.0-0:i386				install
libsdl2-image-2.0-0:amd64			install
libsdl2-image-2.0-0:i386			install
libsdl2-ttf-2.0-0:amd64				install
libsdl2-ttf-2.0-0:i386				install

Installed mesa packages:

$ dpkg --get-selections | grep mesa
libd3dadapter9-mesa:amd64			install
libd3dadapter9-mesa:i386			install
libegl-mesa0:amd64				install
libegl-mesa0:i386				install
libegl1-mesa:amd64				install
libegl1-mesa:i386				install
libgl1-mesa-dri:amd64				install
libgl1-mesa-dri:i386				install
libgl1-mesa-glx:amd64				install
libgl1-mesa-glx:i386				install
libglapi-mesa:amd64				install
libglapi-mesa:i386				install
libglu1-mesa:amd64				install
libglu1-mesa:i386				install
libglx-mesa0:amd64				install
libglx-mesa0:i386				install
libosmesa6:amd64				install
libosmesa6:i386					install
mesa-utils					install
mesa-va-drivers:amd64				install
mesa-va-drivers:i386				install
mesa-vdpau-drivers:amd64			install
mesa-vdpau-drivers:i386				install
mesa-vulkan-drivers:amd64			install
mesa-vulkan-drivers:i386			install

My specs:

https://gist.github.com/rea987/cfe3ac222c4cddfb29c3a3a45456812d

@popsUlfr popsUlfr added the bug Something isn't working label Dec 30, 2018
@popsUlfr
Copy link
Owner

Thank you for the report :)

Would it be possible for you to test the game with a normal wine patched with gallium nine ? Like https://launchpad.net/~commendsarnex/+archive/ubuntu/winedri3 ?

@rea987
Copy link
Author

rea987 commented Jan 1, 2019

I conducted series of tests.

Dear Esther (Steam for Linux, Windows version, Source Engine version, full game) via Proton with Gallium Nine:

steam-203810.log

1600x900:
proton_gallium_900p

1024x768:
proton_gallium_1024x768

Dear Esther (DRM-Free [Humble Bundle], Windows version, Source Engine version, full game) via WINE with Gallium Nine:

https://gist.github.com/rea987/df44f16c46696ca3e12e9a31df033919

1600x900:
wine_gallium_900p

1024x768:
dsc_1111
(Had to take photo with my phone since neither in-game SS function, nor system's SS application show stretched image properly)

Dear Esther (Steam for Windows, Windows version, Source Engine version, full game) via WINE with Gallium Nine:

https://gist.github.com/rea987/966d83245f0fd3e73b0b3c01ae755172

1600x900:
wine_gallium_steam_900p

1024x768:
dsc_1112
(Needed to use the phone for same reason)

Dear Esther (Steam for Linux, Windows version, Source Engine version, full game via Proton (WineD3D; Proton 3.16-6 Beta):

steam-203810.log

1600x900:
ekran goruntusu 2019-01-01 20-10-01

1024x768:
ekran goruntusu 2019-01-01 20-11-39

Dear Esther (DRM-Free [Humble Bundle], native Linux version ["Native .bin" version], Source Engine version, full game):

Native Linux version is a beach to run on older AMD/Intel GPUs with open source drivers due to OpenGL version requirement which is quite odd considering HL2, TF2 and CSS run just fine on such hardware with open source drivers. Overriding Mesa GL version makes the game launch and run okay but it seems to disable resolutions below native resolution on fullscreen. So I needed to exclude native Linux version with OpenGL renderer unfortunately. Though, other native games like HL and Xonotic can switch to below native resolutions on fullscreen just fine.
https://archive.vn/MjRjI#selection-3735.0-3743.0

Company of Heroes with Steam for Linux via Proton (WineD3D; Proton 3.16-6 Beta):

steam-228200.log

1600x900:
ekran goruntusu 2019-01-01 20-05-55

1024x768:
ekran goruntusu 2019-01-01 20-07-33

Company of Heroes with Steam for Windows via WINE with Gallium Nine:

For unknown reason the game failed to launch which is weird since Proton with Gallium Nine launches and runs the game fine. Manually installing DirectX didn't change the result.
https://gist.github.com/rea987/fccba62d65fd4f6cd10e2e37c473ee73

ekran goruntusu 2019-01-01 19-43-19

Conclusion:

  • Proton with Gallium Nine locks the image on top left screen while making mouse cursor useless unless double Alt+Tab is applied.
  • Wine with Gallium Nine stretches the image to widescreen which of course corrupts the image to some extend due to 4:3 to 16:9 conversion. That's somewhat common in some Windows games.
  • Proton with WineD3D properly centers the image; top and bottom of the image fit top and bottom of the screen which leaves black bars in the sides which is okay.

Considering that there are many resource heavy, demanding Direct3D 9 games such as Crysis, Deus Ex: Human Revolution, etc; being able to properly downgrade resolution to get higher framerate is a must for mid-end, low-end and laptop users. Although, I personally prefer fitted image behaviour of WineD3D, stretched image behaviour of Wine with Gallium Nine is also acceptable. Lastly, being unable to downgrade resolution on fullscreen mode at Dear Esther (Linux native) has made me doubt my hardware, settings and packages. Therefore, it is advised someone else to test downgrading resolution issue.

@popsUlfr
Copy link
Owner

popsUlfr commented Feb 2, 2019

I'll be switching to dhewg's out-of-tree gallium nine : https://github.com/dhewg/nine which might correct this behavior. I'll also pull the d3d9 build deps out of the steam runtime and add it to the proton tools library.

@dhewg
Copy link

dhewg commented Feb 4, 2019

It is, as briefly mentioned on the wiki: https://github.com/iXit/wine-nine-standalone/wiki/Interoperability

Two patches are required:

  1. iXit/wine-nine-standalone@c25fd39
  2. https://cgit.freedesktop.org/mesa/mesa/commit/?id=1cc8192ad0be52220043d40f2c7ead149d479809

I'm not sure if 1) is part of your current nine patches, but it is part of the standalone version
2) is only part of mesa master atm (so 19 or greater).

I'm using this combination myself to upscale to 4k.

@popsUlfr
Copy link
Owner

popsUlfr commented Feb 4, 2019

I'm not sure if 1) is part of your current nine patches, but it is part of the standalone version

Unfortunately it wasn't part of the patches I merged into wine.
Thank you for confirming, I'll be moving to the standalone version as soon as possible.

@danilo-bc
Copy link

Thank you so much for opening this issue. The same behaviour happens to Borderlands, but with more bugs, apparently.

Opening Borderlands in 1280x720 makes it go to the top left part of the screen. When I tried to change the resolution in-game, the game gives an error message and crashes.

Manually changing game resolution on WillowEngine.ini has the game running on 1920x1080. I won't add further info because Borderlands itself is a big buggy mess right now...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants