Fix commandline options in build
This commit is contained in:
@@ -145,9 +145,7 @@ bool CommandLine::Parse(const Char* cmdLine)
|
|||||||
PARSE_BOOL_SWITCH("-monolog ", MonoLog);
|
PARSE_BOOL_SWITCH("-monolog ", MonoLog);
|
||||||
PARSE_BOOL_SWITCH("-mute ", Mute);
|
PARSE_BOOL_SWITCH("-mute ", Mute);
|
||||||
PARSE_BOOL_SWITCH("-lowdpi ", LowDPI);
|
PARSE_BOOL_SWITCH("-lowdpi ", LowDPI);
|
||||||
|
|
||||||
#if USE_EDITOR
|
#if USE_EDITOR
|
||||||
|
|
||||||
PARSE_BOOL_SWITCH("-clearcache ", ClearCache);
|
PARSE_BOOL_SWITCH("-clearcache ", ClearCache);
|
||||||
PARSE_BOOL_SWITCH("-clearcooker ", ClearCookerCache);
|
PARSE_BOOL_SWITCH("-clearcooker ", ClearCookerCache);
|
||||||
PARSE_ARG_SWITCH("-project ", Project);
|
PARSE_ARG_SWITCH("-project ", Project);
|
||||||
@@ -156,9 +154,10 @@ bool CommandLine::Parse(const Char* cmdLine)
|
|||||||
PARSE_ARG_SWITCH("-build ", Build);
|
PARSE_ARG_SWITCH("-build ", Build);
|
||||||
PARSE_BOOL_SWITCH("-skipcompile ", SkipCompile);
|
PARSE_BOOL_SWITCH("-skipcompile ", SkipCompile);
|
||||||
PARSE_BOOL_SWITCH("-shaderdebug ", ShaderDebug);
|
PARSE_BOOL_SWITCH("-shaderdebug ", ShaderDebug);
|
||||||
PARSE_BOOL_SWITCH("-shaderprofile ", ShaderProfile);
|
|
||||||
PARSE_ARG_OPT_SWITCH("-play ", Play);
|
PARSE_ARG_OPT_SWITCH("-play ", Play);
|
||||||
|
#endif
|
||||||
|
#if USE_EDITOR || !BUILD_RELEASE
|
||||||
|
PARSE_BOOL_SWITCH("-shaderprofile ", ShaderProfile);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -128,7 +128,6 @@ public:
|
|||||||
Nullable<bool> LowDPI;
|
Nullable<bool> LowDPI;
|
||||||
|
|
||||||
#if USE_EDITOR
|
#if USE_EDITOR
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// -project !path! (Startup project path)
|
/// -project !path! (Startup project path)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -169,16 +168,17 @@ public:
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
Nullable<bool> ShaderDebug;
|
Nullable<bool> ShaderDebug;
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// -shaderprofile (enables debugging data generation for shaders but leaves shader compiler optimizations active for performance profiling)
|
|
||||||
/// </summary>
|
|
||||||
Nullable<bool> ShaderProfile;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// -play !guid! ( Scene to play, can be empty to use default )
|
/// -play !guid! ( Scene to play, can be empty to use default )
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Nullable<String> Play;
|
Nullable<String> Play;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if USE_EDITOR || !BUILD_RELEASE
|
||||||
|
/// <summary>
|
||||||
|
/// -shaderprofile (enables debugging data generation for shaders but leaves shader compiler optimizations active for performance profiling)
|
||||||
|
/// </summary>
|
||||||
|
Nullable<bool> ShaderProfile;
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -188,9 +188,14 @@ bool GraphicsService::Init()
|
|||||||
);
|
);
|
||||||
|
|
||||||
// Initialize
|
// Initialize
|
||||||
if (device->IsDebugToolAttached ||
|
if (device->IsDebugToolAttached
|
||||||
CommandLine::Options.ShaderProfile ||
|
#if USE_EDITOR || !BUILD_RELEASE
|
||||||
CommandLine::Options.ShaderDebug)
|
|| CommandLine::Options.ShaderProfile
|
||||||
|
#endif
|
||||||
|
#if USE_EDITOR
|
||||||
|
|| CommandLine::Options.ShaderDebug
|
||||||
|
#endif
|
||||||
|
)
|
||||||
{
|
{
|
||||||
#if COMPILE_WITH_PROFILER
|
#if COMPILE_WITH_PROFILER
|
||||||
// Auto-enable GPU events
|
// Auto-enable GPU events
|
||||||
|
|||||||
Reference in New Issue
Block a user