Hiding Game Window Borders In Wine

robotanarchy edited this page May 25, 2015 · 2 revisions

A

The simplest way: modifying the window properties with autoit3:

#include <WinAPI.au3>
#include <WindowsConstants.au3> 


$handle = WinGetHandle("GTA2")

consolewrite("handle: " & $handle & @crlf)

_WinAPI_SetWindowLong($handle, $GWL_STYLE, $WS_POPUP)

Result: Window doesn't react anymore in wine!

B

Tried to change the dwStyle in CreateWindowEx and similar functions (AdjustWindowEx) in GTA2.exe and dmavideo_original.dll. Result is that they don't affect the ingame-window at all (probably the network dialogs, but not sure how useful modifying them would be). Some hacking with ollydbg showed, that the CreateWindowEx function gets called from wined3d.dll. Shipping a custom wine-dll-file isn't really that good.

C

Third approach would be: change the wine theme, so it doesn't display borders (G2HR will run in its own wine prefix anyway). Scratch that, modifying the registry might be enough:

[HKCU/Control Panel/Desktop/WindowMetrics]

CaptionHeight=0
CaptionWidth=0
BorderWidth=0
...

It doesn't get smaller than a minimum size :/

D

Drawing black borders with AutoIt3 over the window frames (as popup-windows). This will always work, and could be combined with C to make the borders smaller. Maybe we should just go with that, seems to be the most portable solution.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.