Commit 05bd7291 authored by hybrid's avatar hybrid

Fixed initialization, reported by CuteAlien.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@674 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 4103ddd0
...@@ -23,17 +23,23 @@ namespace irr ...@@ -23,17 +23,23 @@ namespace irr
{ {
namespace video namespace video
{ {
#ifdef _IRR_COMPILE_WITH_DIRECT3D_8_
IVideoDriver* createDirectX8Driver(const core::dimension2d<s32>& screenSize, HWND window, IVideoDriver* createDirectX8Driver(const core::dimension2d<s32>& screenSize, HWND window,
u32 bits, bool fullscreen, bool stencilbuffer, io::IFileSystem* io, u32 bits, bool fullscreen, bool stencilbuffer, io::IFileSystem* io,
bool pureSoftware, bool highPrecisionFPU, bool vsync, bool antiAlias); bool pureSoftware, bool highPrecisionFPU, bool vsync, bool antiAlias);
#endif
#ifdef _IRR_COMPILE_WITH_DIRECT3D_9_
IVideoDriver* createDirectX9Driver(const core::dimension2d<s32>& screenSize, HWND window, IVideoDriver* createDirectX9Driver(const core::dimension2d<s32>& screenSize, HWND window,
u32 bits, bool fullscreen, bool stencilbuffer, io::IFileSystem* io, u32 bits, bool fullscreen, bool stencilbuffer, io::IFileSystem* io,
bool pureSoftware, bool highPrecisionFPU, bool vsync, bool antiAlias); bool pureSoftware, bool highPrecisionFPU, bool vsync, bool antiAlias);
#endif
#ifdef _IRR_COMPILE_WITH_OPENGL_
IVideoDriver* createOpenGLDriver(const core::dimension2d<s32>& screenSize, HWND window, IVideoDriver* createOpenGLDriver(const core::dimension2d<s32>& screenSize, HWND window,
u32 bits, bool fullscreen, bool stencilBuffer, io::IFileSystem* io, u32 bits, bool fullscreen, bool stencilBuffer, io::IFileSystem* io,
bool vsync, bool antiAlias); bool vsync, bool antiAlias);
#endif
} }
} // end namespace irr } // end namespace irr
...@@ -742,6 +748,8 @@ video::IVideoModeList* CIrrDeviceWin32::getVideoModeList() ...@@ -742,6 +748,8 @@ video::IVideoModeList* CIrrDeviceWin32::getVideoModeList()
// enumerate video modes. // enumerate video modes.
DWORD i=0; DWORD i=0;
DEVMODE mode; DEVMODE mode;
memset(&mode, 0, sizeof(mode));
mode.dmSize = sizeof(mode);
while (EnumDisplaySettings(NULL, i, &mode)) while (EnumDisplaySettings(NULL, i, &mode))
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment