diff --git a/src/client/refresh/soft/sw_draw.c b/src/client/refresh/soft/sw_draw.c index 76d865d6..6339e4db 100644 --- a/src/client/refresh/soft/sw_draw.c +++ b/src/client/refresh/soft/sw_draw.c @@ -177,7 +177,9 @@ RE_Draw_StretchPicImplementation (int x, int y, int w, int h, const image_t *pic (x + w > vid.width) || (y + h > vid.height)) { - ri.Sys_Error(ERR_FATAL, "%s: bad coordinates", __func__); + R_Printf(PRINT_ALL, "%s: bad coordinates %dx%d[%dx%d]", + __func__, x, y, w, h); + return; } VID_DamageBuffer(x, y); diff --git a/src/client/refresh/soft/sw_main.c b/src/client/refresh/soft/sw_main.c index fdefe0b3..0d0bcc00 100644 --- a/src/client/refresh/soft/sw_main.c +++ b/src/client/refresh/soft/sw_main.c @@ -855,8 +855,13 @@ R_DrawEntitiesOnList (void) R_AliasDrawModel(currententity, currentmodel); break; - default: + case mod_brush: break; + + default: + R_Printf(PRINT_ALL, "%s: Bad modeltype %d\n", + __func__, currentmodel->type); + return; } } } @@ -900,8 +905,13 @@ R_DrawEntitiesOnList (void) R_AliasDrawModel(currententity, currentmodel); break; - default: + case mod_brush: break; + + default: + R_Printf(PRINT_ALL, "%s: Bad modeltype %d\n", + __func__, currentmodel->type); + return; } } } @@ -1453,7 +1463,8 @@ RE_BeginFrame( float camera_separation ) // we need redraw everything VID_WholeDamageBuffer(); // and backbuffer should be zeroed - memset(swap_buffers + ((swap_current + 1)&1), 0, vid.height * vid.width * sizeof(pixel_t)); + memset(swap_buffers + ((swap_current + 1)&1), 0, + vid.height * vid.width * sizeof(pixel_t)); vid_gamma->modified = false; sw_overbrightbits->modified = false; @@ -2140,7 +2151,8 @@ RE_CleanFrame(void) int pitch; Uint32 *pixels; - memset(swap_buffers, 0, vid.height * vid.width * sizeof(pixel_t) * 2); + memset(swap_buffers, 0, + vid.height * vid.width * sizeof(pixel_t) * 2); if (SDL_LockTexture(texture, NULL, (void**)&pixels, &pitch)) { @@ -2291,9 +2303,9 @@ SWimp_SetMode(int *pwidth, int *pheight, int mode, int fullscreen ) if(ri.GLimp_GetDesktopMode(&real_width, &real_height)) { - if (real_height) + if (real_height && (real_height != *pheight)) { - *pwidth = (*pheight) * real_width / real_height; + *pwidth = ((*pheight) * real_width) / real_height; } } diff --git a/src/client/refresh/vk/vk_rmain.c b/src/client/refresh/vk/vk_rmain.c index bd3930e8..d0087dea 100644 --- a/src/client/refresh/vk/vk_rmain.c +++ b/src/client/refresh/vk/vk_rmain.c @@ -355,8 +355,9 @@ void R_DrawEntitiesOnList (void) R_DrawSpriteModel(currententity, currentmodel); break; default: - ri.Sys_Error(ERR_DROP, "%s, Bad modeltype", __func__); - break; + R_Printf(PRINT_ALL, "%s: Bad modeltype %d\n", + __func__, currentmodel->type); + return; } } } @@ -394,8 +395,9 @@ void R_DrawEntitiesOnList (void) R_DrawSpriteModel(currententity, currentmodel); break; default: - ri.Sys_Error(ERR_DROP, "%s, Bad modeltype", __func__); - break; + R_Printf(PRINT_ALL, "%s: Bad modeltype %d\n", + __func__, currentmodel->type); + return; } } }