···10611061 }
1062106210631063 // Store the window info
10641064- SDL_GetWindowSize(window, &target->context->window_w, &target->context->window_h);
10651065- SDL_GL_GetDrawableSize(window, &target->context->drawable_w, &target->context->drawable_h);
10661066- target->context->stored_window_w = target->context->window_w;
10671067- target->context->stored_window_h = target->context->window_h;
10681064 target->context->windowID = SDL_GetWindowID(window);
1069106510701066 // Make a new context if needed and make it current
···10731069 target->context->context = SDL_GL_CreateContext(window);
10741070 GPU_AddWindowMapping(target);
10751071 }
10721072+10731073+ // Get window dimensions
10741074+ SDL_GetWindowSize(window, &target->context->window_w, &target->context->window_h);
10751075+ target->context->stored_window_w = target->context->window_w;
10761076+ target->context->stored_window_h = target->context->window_h;
10771077+ // We need a GL context before we can get the drawable size.
10781078+ SDL_GL_GetDrawableSize(window, &target->context->drawable_w, &target->context->drawable_h);
1076107910771080 #else
10781081