| 276 | } |
| 277 | |
| 278 | int APIENTRY _tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) { |
| 279 | UNREFERENCED_PARAMETER(hPrevInstance); |
| 280 | UNREFERENCED_PARAMETER(lpCmdLine); |
| 281 | |
| 282 | // Disable automatic DPI scaling. |
| 283 | SetProcessDPIAware(); |
| 284 | |
| 285 | MSG msg; |
| 286 | HACCEL hAccelTable; |
| 287 | |
| 288 | // Initialize global strings |
| 289 | LoadString(hInstance, IDS_APP_TITLE, szTitle, COUNT_OF(szTitle)); |
| 290 | |
| 291 | // Perform application initialization |
| 292 | if (!InitInstance(nCmdShow)) { |
| 293 | return FALSE; |
| 294 | } |
| 295 | |
| 296 | hAccelTable = LoadAccelerators(hInstance, MAKEINTRESOURCE(IDC_TESTRENDERER)); |
| 297 | |
| 298 | while (1) { |
| 299 | while (PeekMessage(&msg, nullptr, 0, 0, PM_REMOVE)) { |
| 300 | if (msg.message == WM_QUIT) { |
| 301 | goto QUIT; |
| 302 | } |
| 303 | |
| 304 | if (!TranslateAccelerator(msg.hwnd, hAccelTable, &msg)) { |
| 305 | TranslateMessage(&msg); |
| 306 | DispatchMessage(&msg); |
| 307 | } |
| 308 | } |
| 309 | |
| 310 | app.RunFrame(); |
| 311 | |
| 312 | if (mainContext) { |
| 313 | BE1::rhi.DisplayContext(mainContext); |
| 314 | } |
| 315 | #ifdef CREATE_SUB_WINDOW |
| 316 | if (subContext) { |
| 317 | BE1::rhi.DisplayContext(subContext); |
| 318 | } |
| 319 | #endif |
| 320 | } |
| 321 | |
| 322 | QUIT: |
| 323 | ShutdownInstance(); |
| 324 | |
| 325 | return (int)msg.wParam; |
| 326 | } |
| 327 | |
| 328 | INT_PTR CALLBACK About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) { |
| 329 | UNREFERENCED_PARAMETER(lParam); |
nothing calls this directly
no test coverage detected