浏览代码

SDL2: shake

Wei Mingzhi 10 年之前
父节点
当前提交
8f980b32dc
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      video.c

+ 1 - 1
video.c

@@ -342,7 +342,7 @@ VIDEO_UpdateScreen(
           
           
           dstrect.x = 0;
           dstrect.x = 0;
           dstrect.y = 0;
           dstrect.y = 0;
-          dstrect.w = 320 * viewport.w / viewport.w;
+          dstrect.w = 320 * viewport.w / gpScreen->w;
           dstrect.h = (200 - g_wShakeLevel) * viewport.h / gpScreen->h;
           dstrect.h = (200 - g_wShakeLevel) * viewport.h / gpScreen->h;
           
           
           if (g_wShakeTime & 1)
           if (g_wShakeTime & 1)