Forums
March 28, 2024, 10:41 PM

Author Topic: D3D9Wnd 0.7.1.1: Direct3D 9-based windowed mode with multi-monitor support  (Read 89645 times)

0 Members and 2 Guests are viewing this topic.

Offline eule

hey the game is working now after installing direct x 9c, the menus are still slow but ingame everything's fine after using ddrawfix

thanks!  :)

Offline oScarDiAnno

Hello! Thanks a lot for such a great tool, it's what I always wished for multitasking haha. Wish I knew it before!

I'm only struggling with something, I have two monitors and I want to run the game on the secondary one.
Config is set to borderless, but I can't move the "window" by pulsing Ctrl + G and "dragging it" as you say.

I have Windows 10 (updates disabled, i'm at 1607) + SuperFrontendHD, Rubberworm and this one.

Everything else works properly.

Configs:
D3D9Wnd:
Code: [Select]
[Misc]
EnableModule=1
StaticWindowClass=0
NoTopmost=1
SoundInBackground=1
FancyStartup=0

[FrontendSettings]
Fullscreen=0
FullscreenAlternative=0
Stretch=0
Centered=0
RunInBackground=1

[InGameSettings]
Fullscreen=0
WindowBorder=1
Stretch=0
QuickInfo=1
TopLeftPosition=0

[MultiMonitor]
Enable=0
Monitors=Max
AutoSetResolution=1

SuperFrontendHD:
Code: [Select]
[Misc]
EnableModule=1
Resolution=Auto
CustomWidth=0
CustomHeight=0

[Magnification]
FontScaling=Default
SuperGraphics=1
AutoScaleMissingGraphics=0
SetInternalResolution=Auto
CustomInternalWidth=0
CustomInternalHeight=0

Thanks again! :D

Offline j0e

  • Sr. Member
  • ****

  • Canada Canada
  • Posts: 445
    • View Profile
Hello! Thanks a lot for such a great tool, it's what I always wished for multitasking haha. Wish I knew it before!

I'm only struggling with something, I have two monitors and I want to run the game on the secondary one.
Config is set to borderless, but I can't move the "window" by pulsing Ctrl + G and "dragging it" as you say.

I have Windows 10 (updates disabled, i'm at 1607) + SuperFrontendHD, Rubberworm and this one.

Everything else works properly.

Agreed, Ctrl-G is a godsend. I don't have multiple displays set up right now, so I can't test an actual solution. You may be able to move the in-game window (only in-game) if you turn borderless off and specify an in-game resolution smaller than your desktop resolution. 

Alternative solution: You can move WA around between screens and stuff if you install it in a virtual machine. I used Oracle VM VirtualBox. You need a good computer though or it will stutter. Probably too much work unless you have a VM set up already.  You will not be able to move the frontend (menus) around or to your secondary monitor unless you use a VM.

I heard a rumour that they made some improvements to the frontend in WA 3.8. I don't know what those improvements consist of, but hopefully some kind of window support (or support for 3rd party windowed support).  We should know soon - the update is finished and is just pending Team17's rubber stamp approval process, and then it'll be released, hopefully.

Offline oScarDiAnno

Agreed, Ctrl-G is a godsend. I don't have multiple displays set up right now, so I can't test an actual solution. You may be able to move the in-game window (only in-game) if you turn borderless off and specify an in-game resolution smaller than your desktop resolution. 

Alternative solution: You can move WA around between screens and stuff if you install it in a virtual machine. I used Oracle VM VirtualBox. You need a good computer though or it will stutter. Probably too much work unless you have a VM set up already.  You will not be able to move the frontend (menus) around or to your secondary monitor unless you use a VM.

I heard a rumour that they made some improvements to the frontend in WA 3.8. I don't know what those improvements consist of, but hopefully some kind of window support (or support for 3rd party windowed support).  We should know soon - the update is finished and is just pending Team17's rubber stamp approval process, and then it'll be released, hopefully.

I see man, thanks a lot for the help!

Also... Those are AMAZING news! I heard before people saying that WA 3.8 would never come and blah-blah. But I'm really excited about that, can't wait! haha.
Big cheers to everyone working on that project, and this one. Thanks to everyone who loves Worms and use their knowledge to make it better <3

Offline j0e

  • Sr. Member
  • ****

  • Canada Canada
  • Posts: 445
    • View Profile

Offline SiD

Hello! Thanks a lot for such a great tool, it's what I always wished for multitasking haha. Wish I knew it before!

I'm only struggling with something, I have two monitors and I want to run the game on the secondary one.
Config is set to borderless, but I can't move the "window" by pulsing Ctrl + G and "dragging it" as you say.

I have Windows 10 (updates disabled, i'm at 1607) + SuperFrontendHD, Rubberworm and this one.

Everything else works properly.

Configs:
D3D9Wnd:
Code: [Select]
[Misc]
EnableModule=1
StaticWindowClass=0
NoTopmost=1
SoundInBackground=1
FancyStartup=0

[FrontendSettings]
Fullscreen=0
FullscreenAlternative=0
Stretch=0
Centered=0
RunInBackground=1

[InGameSettings]
Fullscreen=0
WindowBorder=1
Stretch=0
QuickInfo=1
TopLeftPosition=0

[MultiMonitor]
Enable=0
Monitors=Max
AutoSetResolution=1

Thanks again! :D

MultiMonitor isn't enabled in your d3d9wnd config.
my bad
« Last Edit: January 23, 2018, 02:19 PM by SiD »

Offline StepS

You cannot move the window if you have borderless mode enabled. To move the window you first need to enable the border by pressing Ctrl+D, then pressing Ctrl+G to use your mouse and drag it to the other monitor. However, if your window already covers the entire screen, it is impossible to enable the window border during the game. You may need to lower your resolution in options.
It is not possible to start the game on a non-primary monitor by default. However, you can do something else: in your windows settings, set the secondary monitor as primary. So the left monitor will be non-primary, and the game will run on your right monitor.
MultiMonitor is an option that enables you to span the game across multiple monitors. So it will run using both monitors at once. I guess this is not what oScarDiAnno wanted.
It might also be possible to trick the MultiMonitor mode without changing your monitor from secondary to primary. For that to happen, your secondary monitor needs to be logically positioned on the left side in windows settings. After that, you disable the "AutoSetResolution" option (to prevent automatic spanning) and go into the game options to choose the resolution for your secondary monitor. Then, supposedly, the gameplay should start on your secondary monitor. However, the frontend menus will still be stuck on your primary monitor's top left corner!
Dec 30 2013 23:59:44 <StepS> windowed mode isn't the only thing you need about frontend
Dec 30 2013 23:59:49 <StepS> you need it to be actually bigger
Dec 31 2013 00:00:13 <StepS> it actually is very small on my 15-inch full HD screen
Dec 31 2013 00:00:25 <StepS> while running at 640x480 or stretched mode makes it fuzzy
Dec 31 2013 00:00:44 <StepS> this problem has been around since the Worms Armageddon's release and no one has even tried to beat it
[...]

Offline oScarDiAnno

You cannot move the window if you have borderless mode enabled. To move the window you first need to enable the border by pressing Ctrl+D, then pressing Ctrl+G to use your mouse and drag it to the other monitor. However, if your window already covers the entire screen, it is impossible to enable the window border during the game. You may need to lower your resolution in options.
It is not possible to start the game on a non-primary monitor by default. However, you can do something else: in your windows settings, set the secondary monitor as primary. So the left monitor will be non-primary, and the game will run on your right monitor.
MultiMonitor is an option that enables you to span the game across multiple monitors. So it will run using both monitors at once. I guess this is not what oScarDiAnno wanted.
It might also be possible to trick the MultiMonitor mode without changing your monitor from secondary to primary. For that to happen, your secondary monitor needs to be logically positioned on the left side in windows settings. After that, you disable the "AutoSetResolution" option (to prevent automatic spanning) and go into the game options to choose the resolution for your secondary monitor. Then, supposedly, the gameplay should start on your secondary monitor. However, the frontend menus will still be stuck on your primary monitor's top left corner!

I understand. Thanks a lot! I found a small workaround, Steam's Big Picture mode let's you choose which monitor you want to play in. However, what it does is to change your primary monitor to your secondary and then it reverts when you close it. It's not exactly what I wanted because I wanted to be able to open stuff from my desktop, and they move to the secondary (now primary monitor) too. But it's not a big deal, I can just open the Desktop folder on the other screen!

Thanks a lot guys. This (and many others) are awesome tools. Long live Worms!

Offline StepS

D3D9Wnd 0.7.0.7 has been released

Changes:
  • Fixed crash when playing 2 or more rounds with a super-resolution (higher than the desktop resolution) and Assisted Vsync enabled. Thanks to "keitaro" on Discord for the report.
Dec 30 2013 23:59:44 <StepS> windowed mode isn't the only thing you need about frontend
Dec 30 2013 23:59:49 <StepS> you need it to be actually bigger
Dec 31 2013 00:00:13 <StepS> it actually is very small on my 15-inch full HD screen
Dec 31 2013 00:00:25 <StepS> while running at 640x480 or stretched mode makes it fuzzy
Dec 31 2013 00:00:44 <StepS> this problem has been around since the Worms Armageddon's release and no one has even tried to beat it
[...]

Offline cgar

Anyone know how to get this working in wine? The FrontendUseDesktopWindow tweak doesn't seem to fix the black screen issue in D3D9 modes.
Clicking a button in the blackness causes the UI to briefly flash on screen. But it quickly turns black again. Its like a black window is being drawn over it for some reason.
When using stretch you can see this black window obscuring just the top left of the screen.

Works great in windows though. Amazing module.

Offline h3oCharles

not sure how wine will work for this tbh, as wine wrapper already makes a new window.

Offline cgar

Yea with the force virtual desktop tweak the frontend becomes a nice moveable window. But its so small. Would love the same 1080p fullscreen frontend like I have on windows.

Any idea what causes the black window over everything? Its so strange.

Offline StepS

Yea with the force virtual desktop tweak the frontend becomes a nice moveable window. But its so small. Would love the same 1080p fullscreen frontend like I have on windows.

Any idea what causes the black window over everything? Its so strange.
That's because of the design of the frontend menus, called "DXMFC". What happens is that DirectX and MFC work together, where the former renders graphics on the screen, and the latter specifies the layout of buttons, forms and other controls like in a regular Windows application (you can see what the "innards" look like by opening WA.exe in Resource Hacker and opening "Dialog"). However, the result is that there are two windows: the actual graphical window (or DX), and the MFC window over it. Normally, on Windows systems, the MFC window is transparent and never obscures any part of the screen. However, Wine does not perfectly recreate this weird behavior. The result is that with most renderers (except DirectDraw, where it seems to have been implemented specifically for the game), the MFC window appears black and obscures the screen.

On Windows systems that use DWM (Desktop Window Manager) and fake-fullscreen-emulation, starting with Windows 8, another issue can be seen, where the MFC window is transparent, however all forms appear white and cover their graphical counterparts. That was the famous Windows 8/10 bug in 3.6.31.0 that got fixed in 3.7.0.0, although it still manifests itself when running in windowed mode (which D3D9Wnd works around when it's active), and when minimizing/restoring the game in latest Windows 10 updates (with "Fullscreen optimizations" enabled by default), resulting in even more whiteness.

All of these issues have been completely fixed for the next update (3.8.0.0).
Dec 30 2013 23:59:44 <StepS> windowed mode isn't the only thing you need about frontend
Dec 30 2013 23:59:49 <StepS> you need it to be actually bigger
Dec 31 2013 00:00:13 <StepS> it actually is very small on my 15-inch full HD screen
Dec 31 2013 00:00:25 <StepS> while running at 640x480 or stretched mode makes it fuzzy
Dec 31 2013 00:00:44 <StepS> this problem has been around since the Worms Armageddon's release and no one has even tried to beat it
[...]

Offline cgar

That's because of the design of the frontend menus, called "DXMFC". What happens is [...]
All of these issues have been completely fixed for the next update (3.8.0.0).

Thank you very much StepS. A very thorough explanation. I had heard rumblings about the upcoming v3.8 release and got exited. If it will also allow me to use D3D9 with wine then I'm extra excited!  :D

Offline StepS

D3D9Wnd is now open-source
« Reply #119 on: December 28, 2018, 08:05 PM »
D3D9Wnd 0.7.1.0 has been released
  • Localized error/notification message boxes will now use Unicode to work independently of the system encoding.
  • Minor fixes.

D3D9Wnd is now open-source
The full source code of the module, along with Worms Helper Tools (used in WormKit module development), has now been released and is available on GitHub. In addition, two more editions have been released in separate branches: the original simplistic version (now called "D3D9Wnd_naked"), redesigned to work with any Direct3D 9 application, as well as a lightweight edition for WWP Remastered. The wiki page has been updated. You can post your issues, suggestions or patches on GitHub from now on.



D3D9Wnd 0.7.1.1 has been released (April 13, 2019)
  • Fixed version range checking code to detect WA.exe versions better. It is recommended, but not necessary, to update.
« Last Edit: April 20, 2019, 09:23 PM by StepS »
Dec 30 2013 23:59:44 <StepS> windowed mode isn't the only thing you need about frontend
Dec 30 2013 23:59:49 <StepS> you need it to be actually bigger
Dec 31 2013 00:00:13 <StepS> it actually is very small on my 15-inch full HD screen
Dec 31 2013 00:00:25 <StepS> while running at 640x480 or stretched mode makes it fuzzy
Dec 31 2013 00:00:44 <StepS> this problem has been around since the Worms Armageddon's release and no one has even tried to beat it
[...]