[1.09d] Prevent Window Minimising

This forum is for discussions on how to edit what can not be edited through the txt files, needless to say this isn't about battle net hacking.

Moderators: Nefarius, Havvoric

Post Reply
User avatar
Kieran
Senior Moderator
Angel
Posts: 617
Joined: Mon Oct 22, 2007 9:46 am
Location: England
Contact:
Great Britain

Hand-picked

[1.09d] Prevent Window Minimising

Post by Kieran » Mon Jan 29, 2018 11:40 pm

Hello Guys,

I've managed to prevent the window from minimising when you click out of the screen, much like how later versions of the game work.

My query is now that in later version of the game when you click out of the window you can still see the game functioning and movement where as with 1.09d the game pauses although the window is still open.

Has anybody done research in to this in the past?

My D2gfx.dll changes are as follows:

Code: Select all

6FA74942   8B3D 30C1A76F    MOV EDI,DWORD PTR DS:[<&USER32.ShowWindo>; USER32.ShowWindow
6FA74948   6A 06            PUSH 6

6FA74D41   8B3D 30C1A76F    MOV EDI,DWORD PTR DS:[<&USER32.ShowWindo>; USER32.ShowWindow
6FA74D47   6A 06            PUSH 6

6FA74FB6   6A 00            PUSH 0
6FA74FB8   50               PUSH EAX
6FA74FB9   FF15 30C1A76F    CALL DWORD PTR DS:[<&USER32.ShowWindow>] ; USER32.ShowWindow
The two PUSH 6's and the PUSH 0 changed to PUSH 4's

Kier

FearedBliss
Posts: 82
Joined: Sat Oct 16, 2010 4:29 pm
United States of America

Re: [1.09d] Prevent Window Minimising

Post by FearedBliss » Tue Jan 30, 2018 1:00 am

@galaxyhaxz and I worked on a solution for this which works successfully. The mod I linked to you before has implemented this for 1.00 - 1.10f. The code is a little bit involved but it works well (It involves a bit of custom code) and allows the game to keep running and not minimize. Also no black screen when you click out. I won't explain everything since it detailed but there are some things I documented. For anything else, you can download X32DBG, import the patch of changes for lets say 1.09b, and then look at the code we wrote.

https://github.com/fearedbliss/singling ... zation.txt

And that's something you need to keep in mind, make sure that your fix works for both window mode and full screen. All of the window mode fixes I've seen works for window mode to some extent, but completely break full screen (The game will start up, but when you minimize, and then maximize, the game will stay black).

User avatar
Kieran
Senior Moderator
Angel
Posts: 617
Joined: Mon Oct 22, 2007 9:46 am
Location: England
Contact:
Great Britain

Hand-picked

Re: [1.09d] Prevent Window Minimising

Post by Kieran » Tue Jan 30, 2018 1:49 am

FearedBliss wrote:
Tue Jan 30, 2018 1:00 am
@galaxyhaxz and I worked on a solution for this which works successfully. The mod I linked to you before has implemented this for 1.00 - 1.10f. The code is a little bit involved but it works well (It involves a bit of custom code) and allows the game to keep running and not minimize. Also no black screen when you click out. I won't explain everything since it detailed but there are some things I documented. For anything else, you can download X32DBG, import the patch of changes for lets say 1.09b, and then look at the code we wrote.

https://github.com/fearedbliss/singling ... zation.txt

And that's something you need to keep in mind, make sure that your fix works for both window mode and full screen. All of the window mode fixes I've seen works for window mode to some extent, but completely break full screen (The game will start up, but when you minimize, and then maximize, the game will stay black).
Thanks for that Bliss. I just tested without window mode and yeah... not good :lol:

Doesn't let me do anything other than re-open the game. I did look at the bits you had documented and I really couldn't follow it. I've not heard of X32DBG either (using OllyDBG) I guess its a similar tool.

I've actually just found the download for your 1.09b D2gfx.dll - purely for experimental reasons I've thrown this in my d2 folder and it seems to work flawlessly with 1.09d too

I will continue to do some digging on how you handled things so I can ensure I'm working with the correct set of .dll files - hopefully I can replicate this over to 1.09d version of D2gfx

Post Reply

Return to “Code Editing”