MCPcopy Create free account
hub / github.com/PolygonTek/BlueshiftEngine / _tWinMain

Function _tWinMain

Source/Player/WinMain.cpp:281–315  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

279}
280
281int APIENTRY _tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) {
282 const HCURSOR hcurSave = ::SetCursor(LoadCursor(0, IDC_WAIT));
283
284 // Disable automatic DPI scaling.
285 //::SetProcessDPIAware();
286
287 // Initialize global strings
288 ::LoadString(hInstance, IDS_APP_TITLE, szTitle, COUNT_OF(szTitle));
289
290 InitInstance(hInstance, lpCmdLine, nCmdShow);
291
292 haccelTable = ::LoadAccelerators(hInstance, MAKEINTRESOURCE(IDC_GAME));
293
294 ::SetCursor(hcurSave);
295
296 ::SetFocus(hmainWnd);
297
298 int t0 = BE1::PlatformTime::Milliseconds();
299
300 while (1) {
301 int t = BE1::PlatformTime::Milliseconds();
302 int elapsedMsec = t - t0;
303 BE1::Clamp(elapsedMsec, 0, 1000);
304
305 t0 = t;
306
307 if (!RunFrameInstance(elapsedMsec)) {
308 break;
309 }
310 }
311
312 ShutdownInstance();
313
314 return 0;
315}
316
317INT_PTR CALLBACK About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) {
318 UNREFERENCED_PARAMETER(lParam);

Callers

nothing calls this directly

Calls 6

LoadStringFunction · 0.85
MillisecondsFunction · 0.85
InitInstanceFunction · 0.70
RunFrameInstanceFunction · 0.70
ShutdownInstanceFunction · 0.70
ClampFunction · 0.50

Tested by

no test coverage detected