“paint” to refresh a part of the screen

Questions about Wine on macOS.
Locked
ipozow
Level 1
Level 1
Posts: 7
Joined: Tue Nov 06, 2018 1:34 pm

“paint” to refresh a part of the screen

Post by ipozow »

Hello

Yesterday I installed a game called Capitalism Lab and everything runs well, except that there is a problem with refreshing the screen.
The screen keeps with the old image until the cursor cross the affected area… This video explains everything: https://youtu.be/vU1xHM20dp0

May be this is related with drivers?
Anyone knows how to fix it?
User avatar
Bob Wya
Level 12
Level 12
Posts: 3068
Joined: Sat Oct 16, 2010 7:40 pm

Re: “paint” to refresh a part of the screen

Post by Bob Wya »

@ipozow

Make sure your Wine version isn't years out-of-date... (Yes this can happen... Really!!)
See: WineHQ Download.

Please can you post a terminal log, with something like:

Code: Select all

export WINEDEBUG=+timestamp,+tid,+wgl
wine start ... &>~/wine_log.txt
(fixing the path for your game executable obviously!)

If posting terminal logs, inline, in a forum post...
Then please use the forum Code tags:

Code: Select all

...
to delimit blocks of terminal commands and output.

Please also post the terminal command you used to launch the game and indicate what directory you are running this command from:

Code: Select all

pwd
See: Wine User's Guide: 3 Using Wine.

The output from:

Code: Select all

glxinfo | egrep '^[[:alpha:]]'
- would also be quite useful.

Also the Capitalism Lab Support FAQ indicates that Capitalism Lab has a Windows XP mode.

So you might want to setup a custom 32-bit WINEPREFIX (if you are using a 64-bit Linux OS) for your game, e.g. something like:

Code: Select all

export WINEPREFIX="${HOME}/.wine32"
WINEARCH=win32 wineboot -u
winetricks winxp
Then install your game to this new 32-bit WINEPREFIX.

Thanks
Bob
ipozow
Level 1
Level 1
Posts: 7
Joined: Tue Nov 06, 2018 1:34 pm

Re: “paint” to refresh a part of the screen

Post by ipozow »

I am using Wine Devel, so I think that is updated.
Also I tried first with CrossOver and it's the same issue.
Also tried with Wine 3.19 but using PlayOnMac, and it's the same. With this and CrossOver one I selected to simulate Windows XP and nothing. I installed it in as 32 bit and nothing changed.

To open the game I just right clicked the executable -> open with -> wine Devel

The output from:

Code: Select all

glxinfo | egrep '^[[:alpha:]]'

Code: Select all

name of display: /private/tmp/com.apple.launchd.JY4yhA2Lx3/org.macosforge.xquartz:0
display: /private/tmp/com.apple.launchd.JY4yhA2Lx3/org.macosforge.xquartz:0  screen: 0
direct rendering: Yes
server glx vendor string: SGI
server glx version string: 1.4
server glx extensions:
client glx vendor string: Mesa Project and SGI
client glx version string: 1.4
client glx extensions:
GLX version: 1.4
GLX extensions:
OpenGL vendor string: Intel Inc.
OpenGL renderer string: Intel(R) Iris(TM) Plus Graphics 640
OpenGL version string: 2.1 INTEL-12.2.17
OpenGL shading language version string: 1.20
OpenGL extensions:
This didn't work for me:
Bob Wya wrote: Please can you post a terminal log, with something like:

Code: Select all

export WINEDEBUG=+timestamp,+tid,+wgl
wine start ... &>~/wine_log.txt
(fixing the path for your game executable obviously!)
Gcenx
Level 6
Level 6
Posts: 709
Joined: Mon Dec 25, 2017 12:11 pm

Re: “paint” to refresh a part of the screen

Post by Gcenx »

ipozow wrote:I am using Wine Devel, so I think that is updated.
Also I tried first with CrossOver and it's the same issue.
Also tried with Wine 3.19 but using PlayOnMac, and it's the same. With this and CrossOver one I selected to simulate Windows XP and nothing. I installed it in as 32 bit and nothing changed.

To open the game I just right clicked the executable -> open with -> wine Devel

The output from:

Code: Select all

glxinfo | egrep '^[[:alpha:]]'

Code: Select all

name of display: /private/tmp/com.apple.launchd.JY4yhA2Lx3/org.macosforge.xquartz:0
display: /private/tmp/com.apple.launchd.JY4yhA2Lx3/org.macosforge.xquartz:0  screen: 0
direct rendering: Yes
server glx vendor string: SGI
server glx version string: 1.4
server glx extensions:
client glx vendor string: Mesa Project and SGI
client glx version string: 1.4
client glx extensions:
GLX version: 1.4
GLX extensions:
OpenGL vendor string: Intel Inc.
OpenGL renderer string: Intel(R) Iris(TM) Plus Graphics 640
OpenGL version string: 2.1 INTEL-12.2.17
OpenGL shading language version string: 1.20
OpenGL extensions:
This didn't work for me:
Bob Wya wrote: Please can you post a terminal log, with something like:

Code: Select all

export WINEDEBUG=+timestamp,+tid,+wgl
wine start ... &>~/wine_log.txt
(fixing the path for your game executable obviously!)
You tried that command from the terminal that’s launched when you run Wine-Devel.app?
ipozow
Level 1
Level 1
Posts: 7
Joined: Tue Nov 06, 2018 1:34 pm

Re: “paint” to refresh a part of the screen

Post by ipozow »

Thanks

Code: Select all

48360.420:006f:fixme:ntdll:find_reg_tz_info Can't find matching timezone information in the registry for -03, bias 240, std (d/m/y): 13/05/2018, dlt (d/m/y): 12/08/2018
48360.557:006f:fixme:exec:SHELL_execute flags ignored: 0x00000100
48360.642:0071:fixme:ntdll:find_reg_tz_info Can't find matching timezone information in the registry for -03, bias 240, std (d/m/y): 13/05/2018, dlt (d/m/y): 12/08/2018
48360.929:0071:fixme:nstc:NSTC2_fnSetControlStyle2 mask & style (0x00000004) contains unsupported style(s): 0x00000004
48360.954:0071:fixme:shell:IShellBrowser_fnSendControlMsg stub, 0x14b918 (2, 1026, a003, 0, 0x33f52c)
48360.954:0071:fixme:shell:IShellBrowser_fnSendControlMsg stub, 0x14b918 (2, 1026, a004, 1, 0x33f52c)
48360.954:0071:fixme:shell:IShellBrowser_fnSendControlMsg stub, 0x14b918 (2, 1025, a003, 1, 0x33f52c)
48360.954:0071:fixme:shell:IShellBrowser_fnSendControlMsg stub, 0x14b918 (2, 1025, a004, 1, 0x33f52c)
48364.800:0071:fixme:shell:IShellBrowser_fnOnViewWindowActive stub, 0x14b918 (0x605570)
48366.652:0071:fixme:exec:SHELL_execute flags ignored: 0x0000000c
48366.773:0074:fixme:ntdll:find_reg_tz_info Can't find matching timezone information in the registry for -03, bias 240, std (d/m/y): 13/05/2018, dlt (d/m/y): 12/08/2018
48454.919:0071:fixme:shell:IShellBrowser_fnOnViewWindowActive stub, 0x14b918 (0x605570)
48465.749:0071:fixme:shell:IShellBrowser_fnOnViewWindowActive stub, 0x14b918 (0x605570)
48465.935:0071:fixme:exec:SHELL_execute flags ignored: 0x0000000c
48466.225:00a8:fixme:ntdll:find_reg_tz_info Can't find matching timezone information in the registry for -03, bias 240, std (d/m/y): 13/05/2018, dlt (d/m/y): 12/08/2018
48485.801:0071:fixme:shell:IShellBrowser_fnSendControlMsg stub, 0x14b918 (2, 1026, a003, 0, 0x33d4ec)
48485.801:0071:fixme:shell:IShellBrowser_fnSendControlMsg stub, 0x14b918 (2, 1026, a004, 1, 0x33d4ec)
48485.801:0071:fixme:shell:IShellBrowser_fnSendControlMsg stub, 0x14b918 (2, 1025, a003, 1, 0x33d4ec)
48485.801:0071:fixme:shell:IShellBrowser_fnSendControlMsg stub, 0x14b918 (2, 1025, a004, 1, 0x33d4ec)
48486.893:0071:fixme:shell:IShellBrowser_fnOnViewWindowActive stub, 0x14b918 (0x60e470)
48487.967:0071:fixme:shell:IShellBrowser_fnSendControlMsg stub, 0x14b918 (2, 1026, a003, 0, 0x33e09c)
48487.967:0071:fixme:shell:IShellBrowser_fnSendControlMsg stub, 0x14b918 (2, 1026, a004, 1, 0x33e09c)
48487.967:0071:fixme:shell:IShellBrowser_fnSendControlMsg stub, 0x14b918 (2, 1025, a003, 1, 0x33e09c)
48487.967:0071:fixme:shell:IShellBrowser_fnSendControlMsg stub, 0x14b918 (2, 1025, a004, 1, 0x33e09c)
48489.245:0071:fixme:shell:IShellBrowser_fnOnViewWindowActive stub, 0x14b918 (0x60dd98)
48490.246:0071:fixme:exec:SHELL_execute flags ignored: 0x0000000c
48490.550:00aa:fixme:ntdll:find_reg_tz_info Can't find matching timezone information in the registry for -03, bias 240, std (d/m/y): 13/05/2018, dlt (d/m/y): 12/08/2018
48493.962:0071:fixme:shell:IShellBrowser_fnOnViewWindowActive stub, 0x14b918 (0x60dd98)
48495.684:0071:err:shell:ICommDlgBrowser3_fnOnDefaultCommand Failed to get IDataObject.
48496.379:0071:err:shell:ICommDlgBrowser3_fnOnDefaultCommand Failed to get IDataObject.
48499.713:0071:fixme:exec:SHELL_execute flags ignored: 0x0000000c
48500.131:00ac:fixme:ntdll:find_reg_tz_info Can't find matching timezone information in the registry for -03, bias 240, std (d/m/y): 13/05/2018, dlt (d/m/y): 12/08/2018
48561.827:00a8:fixme:bidi:resolveImplicit assert failed: pcls[i] < 5
48561.827:00a8:fixme:bidi:resolveImplicit assert failed: pcls[i] < 5
(48561.828:00a8:fixme:bidi:resolveImplicit assert failed: pcls[i] < 5) this millions of times until making the file 150MB
ipozow
Level 1
Level 1
Posts: 7
Joined: Tue Nov 06, 2018 1:34 pm

Re: “paint” to refresh a part of the screen

Post by ipozow »

Gorillatore
Newbie
Newbie
Posts: 4
Joined: Tue Apr 30, 2019 11:19 am

Re: “paint” to refresh a part of the screen

Post by Gorillatore »

Hi, anybody figured out how to solve this problem? Thanks
ipozow
Level 1
Level 1
Posts: 7
Joined: Tue Nov 06, 2018 1:34 pm

Re: “paint” to refresh a part of the screen

Post by ipozow »

you should follow up the bug in this link: https://bugs.winehq.org/show_bug.cgi?id=42148
Gorillatore
Newbie
Newbie
Posts: 4
Joined: Tue Apr 30, 2019 11:19 am

Re: “paint” to refresh a part of the screen

Post by Gorillatore »

Thanks. Went there and if I'm not mistaken, seems like no solution yet? Just posted on that link for help.
ipozow
Level 1
Level 1
Posts: 7
Joined: Tue Nov 06, 2018 1:34 pm

Re: “paint” to refresh a part of the screen

Post by ipozow »

Someone is asking for this: Please attach the result of
WINEDEBUG=+wgl,+d3d,+opengl,+ddraw wine Cap2.exe >> debug.log 2>&1

I don't have wine anymore so I won't be able to help. If you can I think that will be great for the progress of the bug
Gorillatore
Newbie
Newbie
Posts: 4
Joined: Tue Apr 30, 2019 11:19 am

Re: “paint” to refresh a part of the screen

Post by Gorillatore »

I see. I'm a non-dev so I don't know how to provide that. Do you think you could point me in the right direction and tell me how to get that?

By the way, I'm using Cap Lab not Cap 2.
Thanks
ipozow
Level 1
Level 1
Posts: 7
Joined: Tue Nov 06, 2018 1:34 pm

Re: “paint” to refresh a part of the screen

Post by ipozow »

open Wine-devel.app and then run that command, and instead of Cap2.exe you may use CapMain.exe I think it is, or change it to whatever the name it's
Gorillatore
Newbie
Newbie
Posts: 4
Joined: Tue Apr 30, 2019 11:19 am

Re: “paint” to refresh a part of the screen

Post by Gorillatore »

I installed WineDevel and ran CapMain.exe. It asked for permission to install gecko etc., when I denied it just closed an nothing happened.

I tried the query again and nothing happened. I tried CapStart.exe and nothing. I restarted computer and tried both again and nothing.

Any ideas how to proceed?
User avatar
Bob Wya
Level 12
Level 12
Posts: 3068
Joined: Sat Oct 16, 2010 7:40 pm

Re: “paint” to refresh a part of the screen

Post by Bob Wya »

Gorillatore wrote:...
Any ideas how to proceed?
You'll probably want to install wine-gecko - otherwise Wine will not have any rendering engine base...
wine-gecko takes the place of the base/ integrated Internet Explorer version, that MS Windows uses.

Anyway, just run:

Code: Select all

wineboot -u
to re-enable the wine-mono and wine-gecko download checks.

Restarting your computer is a pointless waste of time. Wine only runs as a standard User process, after all.
You can just kill any active Wine processes (for the currently active WINEPREFIX) with:

Code: Select all

wineserver -k
(Usually this works!)

Bob
jamesmcm
Newbie
Newbie
Posts: 1
Joined: Sun Feb 06, 2022 4:10 am

Re: “paint” to refresh a part of the screen

Post by jamesmcm »

Hey, the same issue appears on Linux.

However, you can set the OffscreenRendering to "backbuffer" and the renderer to "gl" - see https://wiki.winehq.org/Useful_Registry_Keys - and then use the "force fullscreen 1024x768" option, so that the game uses the exclusive and fullscreen Cooperative level rather than normal (see https://docs.microsoft.com/en-us/window ... ativelevel ) - i.e. now ddraw does all of the drawing and there should be no gdi involvement.

Now the screen updates but has constant black bars (almost like a vsync issue). This is very similar to the issues described here https://www.virtualdub.org/blog2/entry_239.html
The emulated Blt() routine locks the entire primary surface, thus causing the whole screen to be updated -- and turn black everywhere except for the video panes.
Note that some windows (i.e. the building ones on the left) still don't draw correctly though (having the same issue as before, only drawing when the cursor is over them).

So maybe with this offscreen rendering mode, the copying from the backbuffer to the screen just isn't fast enough to keep up for some reason. Meanwhile in "fbo" mode, it only recopies the part around the cursor even in exclusive/fullscreen mode (probably these are two separate blits in the game?).

So this leads to two questions:
  • Can the backbuffer exclusive rendering be fixed so that it renders correctly without constant black bars? (even just saving the previous screen instead of starting from black might be good enough)
  • Why does the fbo offscreen rendering mode only redraw the cursor rectangle even in fullscreen/exclusive mode?
  • Why do some menus (e.g. construction overlay menu) not draw correctly even with backbuffer exclusive rendering? (This issue plus the backbuffer mode being deprecated mean that fixing the fbo mode might be the best option).
Here are images of the rendering issues (apologies for taking a photo but I couldn't work out how to take a screenshot without it leaving exclusive mode): https://imgur.com/a/HJ4KKWA

Here are the log files from "WINEDEBUG=+timestamp,+tid,+wgl,+d3d,+opengl,+ddraw" (note no +relay as it led to huge log files): https://drive.google.com/file/d/1xiA_9g ... sp=sharing

The weird thing is that the logs for the blits for the cursor rect and the whole screen really seem identical, so it's not clear why the latter isn't being drawn correctly in the fbo case.

I tried to disassemble the game exe but it is difficult to debug since it uses the CapStart.exe launch to then run CapMain.exe - I used w32dasm on the latter but unfortunately it only seems to pick up the first ddraw call to create the interface and nothing else.

Running 32-bit wine built from source in a 32-bit prefix: wine-7.1-231-gcc91ba6da75
Locked