WineHQ
Wine Forums

Board index » WineHQ » Wine Help » Linux




 Page 1 of 1 [ 9 posts ] 



 
Author Message
 Post Posted: Fri Apr 13, 2018 8:47 pm 
Offline
Level 1
Level 1

Joined: Fri Apr 13, 2018 8:39 pm
Posts: 6
Could you help me with 2 more problems in all the old games through wine?

1 If the game is written under a 4x3 ratio and starts on a 16x9 monitor in full screen mode, it stretches to the entire monitor without preserving the aspect ratio. Is it possible to somehow display in full screen mode in the center with the preservation aspect ratio :?:

2 After the game is over, if it has changed the desktop to low resolution, it still does not go back fullHD resolution. :?:

Can these problems be solved :?:


Top 
 Post Posted: Sat Apr 14, 2018 5:17 am 
Offline
Moderator
Moderator
User avatar

Joined: Tue Mar 25, 2008 10:30 pm
Posts: 12216
Try running the game in an emulated virtual desktop (set it on the Graphics tab in winecfg).


Top 
 Post Posted: Sat Apr 14, 2018 5:34 am 
Offline
Level 1
Level 1

Joined: Fri Apr 13, 2018 8:39 pm
Posts: 6
dimesio wrote:
Try running the game in an emulated virtual desktop (set it on the Graphics tab in winecfg).

This method only helps to launch a full-screen application in the window.
But it is necessary that the application is launched on a full screen, but with the preservation of proportions, and it is desirable to remember and return the resolution of the desktop, as in Windows. Are there any similar tools in wine, can there be third-party utilities for this?


Top 
 Post Posted: Sat Apr 14, 2018 9:44 am 
Offline
Moderator
Moderator
User avatar

Joined: Tue Mar 25, 2008 10:30 pm
Posts: 12216
ilya wrote:
But it is necessary that the application is launched on a full screen, but with the preservation of proportions, and it is desirable to remember and return the resolution of the desktop, as in Windows. Are there any similar tools in wine,

The virtual desktop is Wine's tool for this. Set it to the resolution the application wants, and the app should launch full screen in the virtual desktop to those proportions, without affecting the resolution of your desktop.

As for not restoring the desktop resolution after running a fullscreen app, that's a longstanding bug in the X server.
https://bugs.winehq.org/show_bug.cgi?id=10841
https://bugs.freedesktop.org/show_bug.cgi?id=14255


Top 
 Post Posted: Sat Apr 14, 2018 10:39 am 
Offline
Level 1
Level 1

Joined: Fri Apr 13, 2018 8:39 pm
Posts: 6
Either we do not understand each other, or it works differently for me.
I setup emulate the desktop 1024x768 and run the application.
https://itmages.ru/image/view/6603421/571c653d
https://itmages.ru/image/view/6603423/641f9a53
At me after a start there is a virtual desktop and the application is launched, it starts to think that it is in full screen mode.
But in fact, for me, it's just a window. It's clear that the window will not change the desktop resolution, but I need it not to be a window, but a full-screen application, so that it retains the proportions, that is, it does not use all 1920x1080, but only 1440x1080 with center alignment. And then at the exit, including the emergency exit, returned a resolution of 1920x1080.


Top 
 Post Posted: Sat Apr 14, 2018 10:56 am 
Offline
Level 1
Level 1

Joined: Fri Apr 13, 2018 8:39 pm
Posts: 6
dimesio wrote:
As for not restoring the desktop resolution after running a fullscreen app, that's a longstanding bug in the X server.
https://bugs.winehq.org/show_bug.cgi?id=10841
https://bugs.freedesktop.org/show_bug.cgi?id=14255
[/quote]
Thank you for links on bug reports. My second problem is bug xorg.

And what about the implementation of the keep aspect ratio option?
In windows this is either by default or is configured in video drivers.
I use an open driver (nouveau, intel, redionSI, amdgpu).
Is this the problem of video drivers? Where to write or where to find the appropriate bug report?


Top 
 Post Posted: Sat Apr 14, 2018 1:56 pm 
Offline
Level 12
Level 12
User avatar

Joined: Sat Oct 16, 2010 7:40 pm
Posts: 2128
Location: Cambridge
ilya wrote:
Could you help me with 2 more problems in all the old games through wine?

1 If the game is written under a 4x3 ratio and starts on a 16x9 monitor in full screen mode, it stretches to the entire monitor without preserving the aspect ratio. Is it possible to somehow display in full screen mode in the center with the preservation aspect ratio :?:

2 After the game is over, if it has changed the desktop to low resolution, it still does not go back fullHD resolution. :?:

Can these problems be solved :?:


Take a look at: Ubuntu Forums: Maintaining aspect ratio in fullscreen.
NB: this hack only applies to the Nvidia binary driver.

As for restoring your native desktop resolution. This can also be hacked around for older games - running under Wine.
Something like a script pre-launching: wineserver and waiting for the wineserver process to end and then restoring your stock setup - with xrandr.

One day we might even get an SDL-2 shim for Wine to handle desktop resolution changes... 8)

Bob


Top 
 Post Posted: Sat Apr 14, 2018 7:34 pm 
Offline
Level 1
Level 1

Joined: Fri Apr 13, 2018 8:39 pm
Posts: 6
xrandr --output VGA1 --mode 1024x768 --panning 1024x768 --transform 1.33333333,0,-171,0,1,0,0,0,1 && wine /ILYA/Games/ER/Legacy\ Interactive/ER/ER.exe ; xrandr --output VGA1 --mode 1920x1080 --panning 1920x1080 --scale 1x1
Where -171 = -round((1024 * 1.3333333 - 1024) / 2)

Was it not possible to do something similar in the tab, next to the virtual desktop, or even an option that would automatically do this by defining the current display of the desktop resolution and the resolution in which the application is trying to switch?


Top 
 Post Posted: Sat May 05, 2018 9:00 pm 
Offline
Level 1
Level 1

Joined: Fri Apr 13, 2018 8:39 pm
Posts: 6
The script is placed in the directory with the executable file of the game and is also called as this file but without ".exe".
The script disassembles the video mode necessary for this game and comments all the others.
Code:
#!/bin/sh
vga=`xrandr | grep -P " connected (primary )?\d+" | sed -e "s/\(\w\+\) .*/\1/"`
if xrandr --output $vga --set "scaling mode" "Full aspect" 2>/dev/null;then
   wine "$0".exe
else
   #res=640x480 && off=107
   #res=800x600 && off=133
   #res=1024x768 && off=171
   #res=1152x864 && off=192
   #res=1280x960 && off=213
   res=1440x1080 && off=240
   xrandr --output $vga --mode $res --panning $res --transform 1.33333333,0,-$off,0,1,0,0,0,1 && wine "$0".exe ; xrandr --output $vga --auto --panning 0x0 --scale 1x1
fi

It is also need checking all of the modes are supported by your monitor.
Code:
xrandr

If the required modes are not available, you can add them manually by editing the Xorg configuration file.

/etc/X11/xorg.conf.d/50-monitor.conf
Code:
Section "Monitor"
   Identifier "VGA1"
   Modeline "1280x960"  101.25  1280 1360 1488 1696  960 963 967 996 -hsync +vsync
   Modeline "1280x960"  130.00  1280 1368 1504 1728  960 963 967 1005 -hsync +vsync
   Modeline "1440x1080"  129.00  1440 1528 1680 1920  1080 1083 1087 1120 -hsync +vsync
EndSection

Where Identifier "VGA1" is the name of the output, you can determine by executing xradr;
Modeline ... parameters of the added mode.
These parameters are determined by the corresponding cvt calls with the transmitted resolution and frequency.
"_60.00" from the first parameter is cut out.
Code:
cvt 1280 960 60
cvt 1280 960 75
cvt 1440 1080 60

If the monitor supports "scaling mode" "Full aspect" then the file is running via wine without changes.
If not, then the screen is corrected through xrandr.
And then returns the screen to the normal state.


Top 
Display posts from previous:  Sort by  
 
 Page 1 of 1 [ 9 posts ] 




Board index » WineHQ » Wine Help » Linux


Who is online

Users browsing this forum: No registered users and 28 guests

 
 

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: