mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-28 06:53:58 +00:00
- Fixed: APlayerPawn::GiveDefaultInventory() used two different variables
both named item. - Switched ddraw.dll to be delay loaded. With D3D9 now being the default display code, this avoids wasting time loading DDraw if it isn't needed. - Fixed: The Win32 I_FatalError() did not set alreadyThrown, so it could get stuck in an endless fatal error loop. SVN r433 (trunk)
This commit is contained in:
parent
b2b28fa2f5
commit
82cf5d703f
8 changed files with 680 additions and 656 deletions
|
@ -1,4 +1,12 @@
|
||||||
|
December 29, 2006
|
||||||
|
- Fixed: APlayerPawn::GiveDefaultInventory() used two different variables
|
||||||
|
both named item.
|
||||||
|
- Switched ddraw.dll to be delay loaded. With D3D9 now being the default
|
||||||
|
display code, this avoids wasting time loading DDraw if it isn't needed.
|
||||||
|
|
||||||
December 28, 2006
|
December 28, 2006
|
||||||
|
- Fixed: The Win32 I_FatalError() did not set alreadyThrown, so it could get
|
||||||
|
stuck in an endless fatal error loop.
|
||||||
- Fixed: The SDL input code must convert the event.data1 to uppercase.
|
- Fixed: The SDL input code must convert the event.data1 to uppercase.
|
||||||
- Added more resolution options when playing windowed under SDL.
|
- Added more resolution options when playing windowed under SDL.
|
||||||
- Changed SDL mouse handling to be basically identical to the (non-DirectInput)
|
- Changed SDL mouse handling to be basically identical to the (non-DirectInput)
|
||||||
|
|
|
@ -890,7 +890,7 @@ void APlayerPawn::GiveDefaultInventory ()
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
AInventory *item = static_cast<AInventory *>(Spawn (ti, 0,0,0, NO_REPLACE));
|
item = static_cast<AInventory *>(Spawn (ti, 0,0,0, NO_REPLACE));
|
||||||
item->Amount = di->amount;
|
item->Amount = di->amount;
|
||||||
if (item->IsKindOf (RUNTIME_CLASS (AWeapon)))
|
if (item->IsKindOf (RUNTIME_CLASS (AWeapon)))
|
||||||
{
|
{
|
||||||
|
|
|
@ -520,6 +520,7 @@ void STACK_ARGS I_FatalError (const char *error, ...)
|
||||||
|
|
||||||
if (!alreadyThrown) // ignore all but the first message -- killough
|
if (!alreadyThrown) // ignore all but the first message -- killough
|
||||||
{
|
{
|
||||||
|
alreadyThrown = true;
|
||||||
char errortext[MAX_ERRORTEXT];
|
char errortext[MAX_ERRORTEXT];
|
||||||
int index;
|
int index;
|
||||||
va_list argptr;
|
va_list argptr;
|
||||||
|
|
|
@ -73,6 +73,7 @@
|
||||||
IMPLEMENT_ABSTRACT_CLASS(BaseWinFB)
|
IMPLEMENT_ABSTRACT_CLASS(BaseWinFB)
|
||||||
|
|
||||||
typedef IDirect3D9 *(WINAPI *DIRECT3DCREATE9FUNC)(UINT SDKVersion);
|
typedef IDirect3D9 *(WINAPI *DIRECT3DCREATE9FUNC)(UINT SDKVersion);
|
||||||
|
typedef HRESULT (WINAPI *DIRECTDRAWCREATEFUNC)(GUID FAR *lpGUID, LPDIRECTDRAW FAR *lplpDD, IUnknown FAR *pUnkOuter);
|
||||||
|
|
||||||
// PUBLIC FUNCTION PROTOTYPES ----------------------------------------------
|
// PUBLIC FUNCTION PROTOTYPES ----------------------------------------------
|
||||||
|
|
||||||
|
@ -95,6 +96,7 @@ EXTERN_CVAR (Float, Gamma)
|
||||||
// PRIVATE DATA DEFINITIONS ------------------------------------------------
|
// PRIVATE DATA DEFINITIONS ------------------------------------------------
|
||||||
|
|
||||||
static HMODULE D3D9_dll;
|
static HMODULE D3D9_dll;
|
||||||
|
static HMODULE DDraw_dll;
|
||||||
|
|
||||||
// PUBLIC DATA DEFINITIONS -------------------------------------------------
|
// PUBLIC DATA DEFINITIONS -------------------------------------------------
|
||||||
|
|
||||||
|
@ -154,7 +156,7 @@ bool Win32Video::InitD3D9 ()
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create the IDirect3D object.
|
// Obtain an IDirect3D interface.
|
||||||
if ((direct3d_create_9 = (DIRECT3DCREATE9FUNC)GetProcAddress (D3D9_dll, "Direct3DCreate9")) == NULL)
|
if ((direct3d_create_9 = (DIRECT3DCREATE9FUNC)GetProcAddress (D3D9_dll, "Direct3DCreate9")) == NULL)
|
||||||
{
|
{
|
||||||
goto closelib;
|
goto closelib;
|
||||||
|
@ -201,12 +203,25 @@ closelib:
|
||||||
|
|
||||||
void Win32Video::InitDDraw ()
|
void Win32Video::InitDDraw ()
|
||||||
{
|
{
|
||||||
|
DIRECTDRAWCREATEFUNC directdraw_create;
|
||||||
LPDIRECTDRAW ddraw1;
|
LPDIRECTDRAW ddraw1;
|
||||||
STARTLOG;
|
STARTLOG;
|
||||||
|
|
||||||
HRESULT dderr;
|
HRESULT dderr;
|
||||||
|
|
||||||
dderr = DirectDrawCreate (NULL, &ddraw1, NULL);
|
// Load the DirectDraw library.
|
||||||
|
if ((DDraw_dll = LoadLibraryA ("ddraw.dll")) == NULL)
|
||||||
|
{
|
||||||
|
I_FatalError ("Could not load ddraw.dll");
|
||||||
|
}
|
||||||
|
|
||||||
|
// Obtain an IDirectDraw interface.
|
||||||
|
if ((directdraw_create = (DIRECTDRAWCREATEFUNC)GetProcAddress (DDraw_dll, "DirectDrawCreate")) == NULL)
|
||||||
|
{
|
||||||
|
I_FatalError ("The system file ddraw.dll is missing the DirectDrawCreate export");
|
||||||
|
}
|
||||||
|
|
||||||
|
dderr = directdraw_create (NULL, &ddraw1, NULL);
|
||||||
|
|
||||||
if (FAILED(dderr))
|
if (FAILED(dderr))
|
||||||
I_FatalError ("Could not create DirectDraw object: %08lx", dderr);
|
I_FatalError ("Could not create DirectDraw object: %08lx", dderr);
|
||||||
|
|
1244
zdoom.vcproj
1244
zdoom.vcproj
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue