LOL_RELEASE are set by msbuild, and use the debug PSGL on the PS3.legacy
| @@ -24,7 +24,7 @@ | |||||
| <Optimization>Disabled</Optimization> | <Optimization>Disabled</Optimization> | ||||
| <RuntimeLibrary Condition="'$(Platform)'=='Win32' Or '$(Platform)'=='x64'">MultiThreadedDebugDLL</RuntimeLibrary> | <RuntimeLibrary Condition="'$(Platform)'=='Win32' Or '$(Platform)'=='x64'">MultiThreadedDebugDLL</RuntimeLibrary> | ||||
| <RuntimeLibrary Condition="'$(Platform)'=='Xbox 360'">MultiThreadedDebug</RuntimeLibrary> | <RuntimeLibrary Condition="'$(Platform)'=='Xbox 360'">MultiThreadedDebug</RuntimeLibrary> | ||||
| <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> | |||||
| <PreprocessorDefinitions>_DEBUG;LOL_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> | |||||
| </ClCompile> | </ClCompile> | ||||
| <ClCompile Condition="'$(Configuration)'=='Release'"> | <ClCompile Condition="'$(Configuration)'=='Release'"> | ||||
| <GenerateDebugInformation>true</GenerateDebugInformation> | <GenerateDebugInformation>true</GenerateDebugInformation> | ||||
| @@ -38,7 +38,7 @@ | |||||
| <FunctionLevelLinking>true</FunctionLevelLinking> | <FunctionLevelLinking>true</FunctionLevelLinking> | ||||
| <IntrinsicFunctions>true</IntrinsicFunctions> | <IntrinsicFunctions>true</IntrinsicFunctions> | ||||
| <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> | <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> | ||||
| <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> | |||||
| <PreprocessorDefinitions>NDEBUG;LOL_RELEASE;%(PreprocessorDefinitions)</PreprocessorDefinitions> | |||||
| </ClCompile> | </ClCompile> | ||||
| <Link> | <Link> | ||||
| @@ -50,7 +50,8 @@ | |||||
| <GlIncludes>$(GlewDir)\include\GL</GlIncludes> | <GlIncludes>$(GlewDir)\include\GL</GlIncludes> | ||||
| <GlLibs Condition="'$(Platform)'=='Win32'">$(GlewDir)\lib\i686-w64-mingw32</GlLibs> | <GlLibs Condition="'$(Platform)'=='Win32'">$(GlewDir)\lib\i686-w64-mingw32</GlLibs> | ||||
| <GlLibs Condition="'$(Platform)'=='x64'">$(GlewDir)\lib\x86_64-w64-mingw32</GlLibs> | <GlLibs Condition="'$(Platform)'=='x64'">$(GlewDir)\lib\x86_64-w64-mingw32</GlLibs> | ||||
| <GlLibs Condition="'$(Platform)'=='PS3'">$(SCE_PS3_ROOT)\target\ppu\lib\PSGL\RSX\opt</GlLibs> | |||||
| <GlLibs Condition="'$(Platform)|$(Configuration)'=='PS3|Debug'">$(SCE_PS3_ROOT)\target\ppu\lib\PSGL\RSX\debug</GlLibs> | |||||
| <GlLibs Condition="'$(Platform)|$(Configuration)'=='PS3|Release'">$(SCE_PS3_ROOT)\target\ppu\lib\PSGL\RSX\opt</GlLibs> | |||||
| <GlDeps Condition="'$(Platform)'=='Win32'">opengl32.lib;glew32.lib</GlDeps> | <GlDeps Condition="'$(Platform)'=='Win32'">opengl32.lib;glew32.lib</GlDeps> | ||||
| <GlDeps Condition="'$(Platform)'=='x64'">opengl32.lib;glew32.lib</GlDeps> | <GlDeps Condition="'$(Platform)'=='x64'">opengl32.lib;glew32.lib</GlDeps> | ||||
| <GlDeps Condition="'$(Platform)'=='PS3'">libPSGL.a;libgcm_cmd.a;libgcm_sys_stub.a;libcgc.a;libPSGLcgc.a</GlDeps> | <GlDeps Condition="'$(Platform)'=='PS3'">libPSGL.a;libgcm_cmd.a;libgcm_sys_stub.a;libcgc.a;libPSGLcgc.a</GlDeps> | ||||
| @@ -33,6 +33,9 @@ public: | |||||
| todolist(0), autolist(0), | todolist(0), autolist(0), | ||||
| nentities(0), | nentities(0), | ||||
| frame(0), recording(0), deltatime(0), bias(0), fps(0), | frame(0), recording(0), deltatime(0), bias(0), fps(0), | ||||
| #if LOL_DEBUG | |||||
| keepalive(0), | |||||
| #endif | |||||
| quit(0), quitframe(0), quitdelay(20), panic(0) | quit(0), quitframe(0), quitdelay(20), panic(0) | ||||
| { | { | ||||
| for (int i = 0; i < Entity::ALLGROUP_END; i++) | for (int i = 0; i < Entity::ALLGROUP_END; i++) | ||||
| @@ -70,6 +73,9 @@ private: | |||||
| int frame, recording; | int frame, recording; | ||||
| Timer timer; | Timer timer; | ||||
| float deltatime, bias, fps; | float deltatime, bias, fps; | ||||
| #if LOL_DEBUG | |||||
| float keepalive; | |||||
| #endif | |||||
| /* Background threads */ | /* Background threads */ | ||||
| static void *GameThreadMain(void *p); | static void *GameThreadMain(void *p); | ||||
| @@ -154,6 +160,10 @@ int Ticker::Unref(Entity *entity) | |||||
| void *TickerData::GameThreadMain(void * /* p */) | void *TickerData::GameThreadMain(void * /* p */) | ||||
| { | { | ||||
| #if LOL_DEBUG | |||||
| Log::Info("ticker game thread initialised\n"); | |||||
| #endif | |||||
| for (;;) | for (;;) | ||||
| { | { | ||||
| int tick = data->gametick.Pop(); | int tick = data->gametick.Pop(); | ||||
| @@ -200,6 +210,15 @@ void *TickerData::GameThreadMain(void * /* p */) | |||||
| data->bias = 0.f; | data->bias = 0.f; | ||||
| } | } | ||||
| #if LOL_DEBUG | |||||
| data->keepalive += data->deltatime; | |||||
| if (data->keepalive > 10.f) | |||||
| { | |||||
| Log::Info("ticker keepalive: tick!\n"); | |||||
| data->keepalive = 0.f; | |||||
| } | |||||
| #endif | |||||
| /* If shutdown is stuck, kick the first entity we meet and see | /* If shutdown is stuck, kick the first entity we meet and see | ||||
| * whether it makes things better. Note that it is always a bug to | * whether it makes things better. Note that it is always a bug to | ||||
| * have referenced entities after 20 frames, but at least this | * have referenced entities after 20 frames, but at least this | ||||
| @@ -303,6 +322,10 @@ void *TickerData::GameThreadMain(void * /* p */) | |||||
| data->drawtick.Push(0); | data->drawtick.Push(0); | ||||
| #if LOL_DEBUG | |||||
| Log::Info("ticker game thread terminated\n"); | |||||
| #endif | |||||
| return NULL; | return NULL; | ||||
| } | } | ||||