MCPcopy Create free account
hub / github.com/ClassicOldSong/Apollo / SessionMonitorWindowProc

Function SessionMonitorWindowProc

src/main.cpp:70–88  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

68
69#ifdef _WIN32
70LRESULT CALLBACK SessionMonitorWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) {
71 switch (uMsg) {
72 case WM_CLOSE:
73 DestroyWindow(hwnd);
74 return 0;
75 case WM_DESTROY:
76 PostQuitMessage(0);
77 return 0;
78 case WM_ENDSESSION:
79 {
80 // Terminate ourselves with a blocking exit call
81 std::cout << "Received WM_ENDSESSION"sv << std::endl;
82 lifetime::exit_sunshine(0, false);
83 return 0;
84 }
85 default:
86 return DefWindowProc(hwnd, uMsg, wParam, lParam);
87 }
88}
89
90WINAPI BOOL ConsoleCtrlHandler(DWORD type) {
91 if (type == CTRL_CLOSE_EVENT) {

Callers

nothing calls this directly

Calls 1

exit_sunshineFunction · 0.85

Tested by

no test coverage detected