===================================
==        Max Payne 1 & 2        ==
== Unofficial Startup Hang Patch ==
==                               ==
==          by UCyborg           ==
==                               ==
==           1.1.2017            ==
===================================


--------- TABLE OF CONTENTS ---------

1. About

2. Installation


================
==  1. About  ==
================

This patch is intended to solve issues related to game engine initializing Direct3D inside DllMain, which most notably causes
the game to hang during startup with certain combinations of graphics hardware and drivers. Additionally, it is impossible to
run the game through dgVoodoo Direct3D 8 to 11 wrapper, because Direct3D 11 runtime refuses to initialize from DllMain to
prevent lockups.

The patch will solve above mentioned issues and possibly other problems that might be related to Direct3D initialization inside
DllMain by delaying actual initialization to the point when execution flow returns from LoadLibrary API, therefore preventing
any sort of lockup that would occur otherwise.

No compatibility modes should be applied to game executables, as they usually create more problems than they solve. Starting the
game with affinity set to single core also isn't required anymore and will only serve to slow the game down a little.


UPDATE 23.1.2017

-Properly handle the case when DllMain returns FALSE.
-Added Max Payne 2 executable that works with dgVoodoo + ReShade combination.


=======================
==  2. Installation  ==
=======================

Files in this archive are intended to use with latest version of games, which are:

Max Payne v1.05
Max Payne 2 v1.01

If you have Steam version of games, you should already have latest versions, otherwise, they must be updated with appropriate
official patches before applying this patch.

To install, simply extract contents of each game's folder into your own, overwriting original files.
