| 113 | } |
| 114 | |
| 115 | void App::OnWindowResized(void* context, HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) |
| 116 | { |
| 117 | if(msg != WM_SIZE) |
| 118 | return; |
| 119 | |
| 120 | App* app = reinterpret_cast<App*>(context); |
| 121 | |
| 122 | if(wParam != SIZE_MINIMIZED) |
| 123 | { |
| 124 | int width, height; |
| 125 | app->window.GetClientArea(width, height); |
| 126 | |
| 127 | if(uint32(width) != app->swapChain.Width() || uint32(height) != app->swapChain.Height()) |
| 128 | { |
| 129 | app->BeforeReset_Internal(); |
| 130 | |
| 131 | app->swapChain.SetWidth(width); |
| 132 | app->swapChain.SetHeight(height); |
| 133 | app->swapChain.Reset(); |
| 134 | |
| 135 | app->AfterReset_Internal(); |
| 136 | } |
| 137 | } |
| 138 | } |
| 139 | |
| 140 | void App::Exit() |
| 141 | { |
nothing calls this directly
no test coverage detected