浏览代码

tests: Always set valid dimensions for the fullscreen mode

Frank Praznik 2 年之前
父节点
当前提交
8f7427c158
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      src/test/SDL_test_common.c

+ 2 - 0
src/test/SDL_test_common.c

@@ -1287,6 +1287,8 @@ SDLTest_CommonInit(SDLTest_CommonState *state)
                 state->window_w = w;
                 state->window_w = w;
                 state->window_h = h;
                 state->window_h = h;
             }
             }
+            fullscreen_mode.w = state->window_w;
+            fullscreen_mode.h = state->window_h;
             if (SDL_SetWindowDisplayMode(state->windows[i], &fullscreen_mode) < 0) {
             if (SDL_SetWindowDisplayMode(state->windows[i], &fullscreen_mode) < 0) {
                 SDL_Log("Can't set up fullscreen display mode: %s\n",
                 SDL_Log("Can't set up fullscreen display mode: %s\n",
                         SDL_GetError());
                         SDL_GetError());