gpt4 book ai didi

c - SDL_WINDOWEVENT_RESIZED 与 SDL_WINDOWEVENT_SIZE_CHANGED

转载 作者:行者123 更新时间:2023-12-03 18:31:42 28 4
gpt4 key购买 nike

在SDL中,这两个窗口事件有什么区别?

SDL_WINDOWEVENT_RESIZED
SDL_WINDOWEVENT_SIZE_CHANGED

在维基文档页面中有 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

window has been resized to data1 x data2; this event is always preceded by SDL_WINDOWEVENT_SIZE_CHANGED

SDL_WINDOWEVENT_SIZE_CHANGED

window size has changed, either as a result of an API call or through the system or user changing the window size; this event is followed by SDL_WINDOWEVENT_RESIZED if the size was changed by an external event, i.e. the user or the window manager

关于c - SDL_WINDOWEVENT_RESIZED 与 SDL_WINDOWEVENT_SIZE_CHANGED,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55076649/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com