Changeset 1822


Ignore:
Timestamp:
Aug 27, 2012, 2:16:46 PM (11 years ago)
Author:
sam
Message:

debug: add minor debug messages to the ticker, ensure LOL_DEBUG and
LOL_RELEASE are set by msbuild, and use the debug PSGL on the PS3.

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/build/vs2010/Lol.Core.Rules.props

    r1712 r1822  
    2525      <RuntimeLibrary Condition="'$(Platform)'=='Win32' Or '$(Platform)'=='x64'">MultiThreadedDebugDLL</RuntimeLibrary>
    2626      <RuntimeLibrary Condition="'$(Platform)'=='Xbox 360'">MultiThreadedDebug</RuntimeLibrary>
    27       <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     27      <PreprocessorDefinitions>_DEBUG;LOL_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
    2828    </ClCompile>
    2929    <ClCompile Condition="'$(Configuration)'=='Release'">
     
    3939      <IntrinsicFunctions>true</IntrinsicFunctions>
    4040      <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
    41       <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     41      <PreprocessorDefinitions>NDEBUG;LOL_RELEASE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
    4242    </ClCompile>
    4343
  • trunk/build/vs2010/Lol.Core.Vars.props

    r1712 r1822  
    5151    <GlLibs Condition="'$(Platform)'=='Win32'">$(GlewDir)\lib\i686-w64-mingw32</GlLibs>
    5252    <GlLibs Condition="'$(Platform)'=='x64'">$(GlewDir)\lib\x86_64-w64-mingw32</GlLibs>
    53     <GlLibs Condition="'$(Platform)'=='PS3'">$(SCE_PS3_ROOT)\target\ppu\lib\PSGL\RSX\opt</GlLibs>
     53    <GlLibs Condition="'$(Platform)|$(Configuration)'=='PS3|Debug'">$(SCE_PS3_ROOT)\target\ppu\lib\PSGL\RSX\debug</GlLibs>
     54    <GlLibs Condition="'$(Platform)|$(Configuration)'=='PS3|Release'">$(SCE_PS3_ROOT)\target\ppu\lib\PSGL\RSX\opt</GlLibs>
    5455    <GlDeps Condition="'$(Platform)'=='Win32'">opengl32.lib;glew32.lib</GlDeps>
    5556    <GlDeps Condition="'$(Platform)'=='x64'">opengl32.lib;glew32.lib</GlDeps>
  • trunk/src/ticker.cpp

    r1818 r1822  
    3434        nentities(0),
    3535        frame(0), recording(0), deltatime(0), bias(0), fps(0),
     36#if LOL_DEBUG
     37        keepalive(0),
     38#endif
    3639        quit(0), quitframe(0), quitdelay(20), panic(0)
    3740    {
     
    7174    Timer timer;
    7275    float deltatime, bias, fps;
     76#if LOL_DEBUG
     77    float keepalive;
     78#endif
    7379
    7480    /* Background threads */
     
    155161void *TickerData::GameThreadMain(void * /* p */)
    156162{
     163#if LOL_DEBUG
     164    Log::Info("ticker game thread initialised\n");
     165#endif
     166
    157167    for (;;)
    158168    {
     
    200210            data->bias = 0.f;
    201211        }
     212
     213#if LOL_DEBUG
     214        data->keepalive += data->deltatime;
     215        if (data->keepalive > 10.f)
     216        {
     217            Log::Info("ticker keepalive: tick!\n");
     218            data->keepalive = 0.f;
     219        }
     220#endif
    202221
    203222        /* If shutdown is stuck, kick the first entity we meet and see
     
    304323    data->drawtick.Push(0);
    305324
     325#if LOL_DEBUG
     326    Log::Info("ticker game thread terminated\n");
     327#endif
     328
    306329    return NULL;
    307330}
Note: See TracChangeset for help on using the changeset viewer.