- Timestamp:
- 07/31/11 11:42:57 (13 years ago)
- Location:
- ps/trunk/source/lib
- Files:
-
- 3 edited
-
allocators/pool.h (modified) (1 diff)
-
res/sound/snd_mgr.cpp (modified) (3 diffs)
-
sysdep/os/win/tests/test_wdbg_sym.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
ps/trunk/source/lib/allocators/pool.h
r9475 r9944 296 296 pointer allocate(size_type n) 297 297 { 298 // safely handle zero-sized allocations (happens with GCC STL - see ticket #909). 299 if(n == 0) 300 n = 1; 298 301 return p.AllocateMemory<value_type> (n); 299 302 } -
ps/trunk/source/lib/res/sound/snd_mgr.cpp
r9877 r9944 55 55 #include "ogg.h" 56 56 57 // HACK: OpenAL loads and unloads certain DLLs several times on Windows.58 // that looks unnecessary and wastes 100..400 ms on startup.59 // we hold a reference to prevent the actual unload. everything works ATM;60 // hopefully, OpenAL doesn't rely on them actually being unloaded.61 #if OS_WIN62 # define WIN_LOADLIBRARY_HACK 063 #else64 # define WIN_LOADLIBRARY_HACK 065 #endif66 57 67 58 static const size_t maxBufferSize = 64*KiB; … … 223 214 Status ret = INFO::OK; 224 215 225 #if WIN_LOADLIBRARY_HACK226 HMODULE dlls[3];227 dlls[0] = LoadLibrary("wrap_oal.dll");228 dlls[1] = LoadLibrary("setupapi.dll");229 dlls[2] = LoadLibrary("wdmaud.drv");230 #endif231 232 // for reasons unknown, the NV native OpenAL implementation233 // causes an "invalid handle" exception internally when loaded234 // (it's not caused by the DLL load hack above). everything works and235 // we can continue normally; we just need to catch it to prevent the236 // unhandled exception filter from reporting it.237 #if OS_WIN238 __try239 {240 alc_dev = alcOpenDevice((alcString)alc_dev_name);241 }242 // if invalid handle, handle it; otherwise, continue handler search.243 __except(GetExceptionCode() == EXCEPTION_INVALID_HANDLE)244 {245 // ignore246 }247 #else248 216 alc_dev = alcOpenDevice((alcString)alc_dev_name); 249 #endif250 251 217 if(alc_dev) 252 218 { … … 277 243 swprintf_s(buf, ARRAY_SIZE(buf), L"SND| alc_init: success, using %hs\n", dev_name); 278 244 ah_log(buf); 279 280 #if WIN_LOADLIBRARY_HACK281 // release DLL references, so BoundsChecker doesn't complain at exit.282 for(int i = 0; i < ARRAY_SIZE(dlls); i++)283 if(dlls[i] != INVALID_HANDLE_VALUE)284 FreeLibrary(dlls[i]);285 #endif286 245 287 246 return ret; -
ps/trunk/source/lib/sysdep/os/win/tests/test_wdbg_sym.h
r9875 r9944 51 51 52 52 #pragma optimize("", off) 53 #pragma warning(disable:4748) // /GS can not protect [..] from local buffer overrun because optimizations are disabled 53 54 54 55 // (these must be outside of TestWdbgSym so that we can simply
Note:
See TracChangeset
for help on using the changeset viewer.
