mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-22 12:11:25 +00:00
- Made fmodex.dll delay-loaded so the game should be runnable on Windows 95
again, though without sound. SVN r1506 (trunk)
This commit is contained in:
parent
854097ba03
commit
35fe9ae690
3 changed files with 420 additions and 376 deletions
|
@ -1,4 +1,6 @@
|
|||
March 25, 2009
|
||||
- Made fmodex.dll delay-loaded so the game should no be runnable on Windows
|
||||
95 again, though without sound.
|
||||
- Changed gameinfo_t and gameborder_t to be named structs instead of
|
||||
typedef'ed anonymous structs.
|
||||
- Fixed: P_AutoUseHealth() used autousemodes 0 and 1 instead of 1 and 2.
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
/*
|
||||
** i_sound.cpp
|
||||
** fmodsound.cpp
|
||||
** System interface for sound; uses FMOD Ex.
|
||||
**
|
||||
**---------------------------------------------------------------------------
|
||||
** Copyright 1998-2008 Randy Heit
|
||||
** Copyright 1998-2009 Randy Heit
|
||||
** All rights reserved.
|
||||
**
|
||||
** Redistribution and use in source and binary forms, with or without
|
||||
|
@ -582,6 +582,28 @@ bool FMODSoundRenderer::IsValid()
|
|||
return InitSuccess;
|
||||
}
|
||||
|
||||
#ifdef _MSC_VER
|
||||
//==========================================================================
|
||||
//
|
||||
// CheckException
|
||||
//
|
||||
//==========================================================================
|
||||
|
||||
#define FACILITY_VISUALCPP ((LONG)0x6d)
|
||||
#define VcppException(sev,err) ((sev) | (FACILITY_VISUALCPP<<16) | err)
|
||||
|
||||
static int CheckException(DWORD code)
|
||||
{
|
||||
if (code == VcppException(ERROR_SEVERITY_ERROR,ERROR_MOD_NOT_FOUND) ||
|
||||
code == VcppException(ERROR_SEVERITY_ERROR,ERROR_PROC_NOT_FOUND))
|
||||
{
|
||||
return EXCEPTION_EXECUTE_HANDLER;
|
||||
}
|
||||
return EXCEPTION_CONTINUE_SEARCH;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// FMODSoundRenderer :: Init
|
||||
|
@ -619,7 +641,23 @@ bool FMODSoundRenderer::Init()
|
|||
Printf("I_InitSound: Initializing FMOD\n");
|
||||
|
||||
// Create a System object and initialize.
|
||||
#ifdef _MSC_VER
|
||||
__try {
|
||||
#endif
|
||||
result = FMOD::System_Create(&Sys);
|
||||
#ifdef _MSC_VER
|
||||
}
|
||||
__except(CheckException(GetExceptionCode()))
|
||||
{
|
||||
Sys = NULL;
|
||||
Printf(TEXTCOLOR_ORANGE"Failed to load fmodex"
|
||||
#ifdef _WIN64
|
||||
"64"
|
||||
#endif
|
||||
".dll\n");
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
if (result != FMOD_OK)
|
||||
{
|
||||
Sys = NULL;
|
||||
|
|
752
zdoom.vcproj
752
zdoom.vcproj
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue