User Tools

Site Tools


en:examples:debugging:profile_in_code

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

en:examples:debugging:profile_in_code [2018/12/07 05:27 (18 months ago)] (current)
Line 1: Line 1:
 +====== Turning on Profiling with Code ======
 +
 +===== Config ====
 +
 +<​code=ini>​
 +[Input]
 +SetList = InputSetTemplate
 +
 +[InputSetTemplate]
 +KEY_TAB = ToggleProfiler
 +</​code>​
 +
 +===== Code =====
 +
 +<​code=c>​
 +  if(orxInput_HasBeenActivated("​ToggleProfiler"​))
 +  {
 +    /* Toggles profiler rendering */
 +    orxConfig_PushSection(orxRENDER_KZ_CONFIG_SECTION);​
 +    orxConfig_SetBool(orxRENDER_KZ_CONFIG_SHOW_PROFILER,​ !orxConfig_GetBool(orxRENDER_KZ_CONFIG_SHOW_PROFILER));​
 +    orxConfig_PopSection();​
 +  }
 +</​code>​
 +
  
en/examples/debugging/profile_in_code.txt ยท Last modified: 2018/12/07 05:27 (18 months ago) (external edit)