在SDL中,这两个窗口事件之间有什么不同?
SDL_WINDOWEVENT_RESIZED
SDL_WINDOWEVENT_SIZE_CHANGED
在wiki doc页面中有this代码示例:
case SDL_WINDOWEVENT_RESIZED:
SDL_Log("Window %d resized to %dx%d",
event->window.windowID, event->window.data1,
event->window.data2);
break;
case SDL_WINDOWEVENT_SIZE_CHANGED:
SDL_Log("Window %d size changed to %dx%d",
event->window.windowID, event->window.data1,
event->window.data2);
break;
但我没有看到差异。
来自the SDL Wiki:
SDL_WINDOWEVENT_RESIZED
窗口已调整为data1 x data2;这个事件总是先于
SDL_WINDOWEVENT_SIZE_CHANGED
SDL_WINDOWEVENT_SIZE_CHANGED
窗口大小已更改,无论是API调用还是通过系统或用户更改窗口大小;如果大小被外部事件(即用户或窗口管理器)更改,则此事件后面是
SDL_WINDOWEVENT_RESIZED