test/testoverlay2.c
changeset 5274 07559b6cb64f
parent 5264 7ace5f8f432f
child 5357 ea8fec220775
equal deleted inserted replaced
5273:151f40ed9e55 5274:07559b6cb64f
   536         while (SDL_PollEvent(&event)) {
   536         while (SDL_PollEvent(&event)) {
   537             switch (event.type) {
   537             switch (event.type) {
   538             case SDL_WINDOWEVENT:
   538             case SDL_WINDOWEVENT:
   539                 if (event.window.event == SDL_WINDOWEVENT_RESIZED) {
   539                 if (event.window.event == SDL_WINDOWEVENT_RESIZED) {
   540                     displayrect.w = window_w = event.window.data1;
   540                     displayrect.w = window_w = event.window.data1;
   541                     displayrect.w = window_h = event.window.data2;
   541                     displayrect.h = window_h = event.window.data2;
   542                 }
   542                 }
   543                 break;
   543                 break;
   544             case SDL_MOUSEBUTTONDOWN:
   544             case SDL_MOUSEBUTTONDOWN:
   545                 displayrect.x = event.button.x - window_w / 2;
   545                 displayrect.x = event.button.x - window_w / 2;
   546                 displayrect.y = event.button.y - window_h / 2;
   546                 displayrect.y = event.button.y - window_h / 2;