Fix win32 compilation errors when Optick profiling is off

This commit is contained in:
Stephen Saunders 2023-03-04 21:06:08 -05:00
parent 76da1beefd
commit 0c217ebbe9

View file

@ -1949,6 +1949,7 @@ int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLin
Sys_SetDPIAwareness();
// Setting memory allocators
#if USE_OPTICK
OPTICK_SET_MEMORY_ALLOCATOR(
[]( size_t size ) -> void* { return operator new( size ); },
[]( void* p )
@ -1960,6 +1961,7 @@ int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLin
/* Do some TLS initialization here if needed */
}
);
#endif
#if 0
DWORD handler = ( DWORD )_except_handler;
@ -2034,7 +2036,9 @@ int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLin
// main game loop
while( 1 )
{
#if USE_OPTICK
OPTICK_FRAME( "MainThread" );
#endif
Win_Frame();
@ -2049,7 +2053,9 @@ int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLin
common->Frame();
}
#if USE_OPTICK
OPTICK_SHUTDOWN();
#endif
// never gets here
return 0;