Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
966 B

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #include "pch_tier0.h"
  8. #include "vstdlib/pch_vstdlib.h"
  9. #include <assert.h>
  10. #include "tier0/platform.h"
  11. #include "tier0/progressbar.h"
  12. #if !defined(STEAM) && !defined(NO_MALLOC_OVERRIDE)
  13. #include "tier0/memalloc.h"
  14. // memdbgon must be the last include file in a .cpp file!!!
  15. #include "tier0/memdbgon.h"
  16. #endif
  17. static ProgressReportHandler_t pReportHandlerFN;
  18. PLATFORM_INTERFACE void ReportProgress(char const *job_name, int total_units_to_do, int n_units_completed)
  19. {
  20. if ( pReportHandlerFN )
  21. (*pReportHandlerFN)( job_name, total_units_to_do, n_units_completed );
  22. }
  23. PLATFORM_INTERFACE ProgressReportHandler_t InstallProgressReportHandler( ProgressReportHandler_t pfn)
  24. {
  25. ProgressReportHandler_t old = pReportHandlerFN;
  26. pReportHandlerFN = pfn;
  27. return old;
  28. }