Revert "Remove callbacks from samples"

This reverts commit e715a7e67f.
This commit is contained in:
Caelan Sayler
2025-03-12 22:54:02 +00:00
committed by Caelan
parent 088a43bf9e
commit 267a09f456
3 changed files with 31 additions and 1 deletions

View File

@@ -38,6 +38,11 @@ INT_PTR CALLBACK About(HWND, UINT, WPARAM, LPARAM);
std::wstring Utf8ToWString(std::string const& str);
std::string WStringToUtf8(std::wstring const& wstr);
void handle_vpkc_log(void* pUserData, const char* pszLevel, const char* pszMessage)
{
std::cout << pszLevel << ": " << pszMessage << std::endl;
}
int APIENTRY wWinMain(_In_ HINSTANCE hInstance,
_In_opt_ HINSTANCE hPrevInstance,
_In_ LPWSTR lpCmdLine,
@@ -52,6 +57,7 @@ int APIENTRY wWinMain(_In_ HINSTANCE hInstance,
// Initialize Velopack log capture
std::cout << "Velopack C++ Sample App" << std::endl;
vpkc_set_logger(handle_vpkc_log, 0);
// This should run as early as possible in the main method.
// Velopack may exit / restart the app at this point.