From 3bf9df6b2785fa6d951086978a3e66f49427166a Mon Sep 17 00:00:00 2001 From: FluorescentCIAAfricanAmerican <0934gj3049fk@protonmail.com> Date: Wed, 22 Apr 2020 12:56:21 -0400 Subject: 1 --- tier0/progressbar.cpp | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 tier0/progressbar.cpp (limited to 'tier0/progressbar.cpp') diff --git a/tier0/progressbar.cpp b/tier0/progressbar.cpp new file mode 100644 index 0000000..6da72eb --- /dev/null +++ b/tier0/progressbar.cpp @@ -0,0 +1,37 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: +// +// $NoKeywords: $ +//=============================================================================// + +#include "pch_tier0.h" +#include "vstdlib/pch_vstdlib.h" + +#include +#include "tier0/platform.h" +#include "tier0/progressbar.h" + +#if !defined(STEAM) && !defined(NO_MALLOC_OVERRIDE) +#include "tier0/memalloc.h" + +// memdbgon must be the last include file in a .cpp file!!! +#include "tier0/memdbgon.h" +#endif + + +static ProgressReportHandler_t pReportHandlerFN; + +PLATFORM_INTERFACE void ReportProgress(char const *job_name, int total_units_to_do, int n_units_completed) +{ + if ( pReportHandlerFN ) + (*pReportHandlerFN)( job_name, total_units_to_do, n_units_completed ); +} + +PLATFORM_INTERFACE ProgressReportHandler_t InstallProgressReportHandler( ProgressReportHandler_t pfn) +{ + ProgressReportHandler_t old = pReportHandlerFN; + pReportHandlerFN = pfn; + return old; +} + -- cgit v1.2.3