Commit 9b1953ab authored by hybrid's avatar hybrid

Minor fixes for array fixing.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@3688 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 56057e04
...@@ -202,34 +202,34 @@ void COpenGLExtensionHandler::dumpFramebufferFormats() const ...@@ -202,34 +202,34 @@ void COpenGLExtensionHandler::dumpFramebufferFormats() const
#endif #endif
,0,0,0,0 ,0,0,0,0
}; };
size_t nums = sizeof(atts)/sizeof(int)-4; size_t nums = sizeof(atts)/sizeof(int);
const bool depth_float_supported= (wglExtensions.find("WGL_EXT_depth_float") != -1); const bool depth_float_supported= (wglExtensions.find("WGL_EXT_depth_float") != -1);
if (!depth_float_supported) if (!depth_float_supported)
{ {
memmove(&atts[49], &atts[50], (nums-49)*4); memmove(&atts[49], &atts[50], (nums-50)*sizeof(int));
nums -= 1; nums -= 1;
} }
if (!multi_sample_supported) if (!multi_sample_supported)
{ {
memmove(&atts[47], &atts[49], (nums-47)*4); memmove(&atts[47], &atts[49], (nums-49)*sizeof(int));
nums -= 2; nums -= 2;
} }
const bool framebuffer_sRGB_supported= (wglExtensions.find("WGL_ARB_framebuffer_sRGB") != -1); const bool framebuffer_sRGB_supported= (wglExtensions.find("WGL_ARB_framebuffer_sRGB") != -1);
if (!framebuffer_sRGB_supported) if (!framebuffer_sRGB_supported)
{ {
memmove(&atts[46], &atts[47], (nums-46)*4); memmove(&atts[46], &atts[47], (nums-47)*sizeof(int));
nums -= 1; nums -= 1;
} }
const bool pbuffer_supported = (wglExtensions.find("WGL_ARB_pbuffer") != -1); const bool pbuffer_supported = (wglExtensions.find("WGL_ARB_pbuffer") != -1);
if (!pbuffer_supported) if (!pbuffer_supported)
{ {
memmove(&atts[42], &atts[46], (nums-42)*4); memmove(&atts[42], &atts[46], (nums-46)*sizeof(int));
nums -= 4; nums -= 4;
} }
const bool render_texture_supported = (wglExtensions.find("WGL_ARB_render_texture") != -1); const bool render_texture_supported = (wglExtensions.find("WGL_ARB_render_texture") != -1);
if (!render_texture_supported) if (!render_texture_supported)
{ {
memmove(&atts[40], &atts[42], (nums-40)*4); memmove(&atts[40], &atts[42], (nums-42)*sizeof(int));
nums -= 2; nums -= 2;
} }
wglGetPixelFormatAttribiv_ARB(hdc,0,0,1,atts,vals); wglGetPixelFormatAttribiv_ARB(hdc,0,0,1,atts,vals);
......
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