MCPcopy Create free account
hub / github.com/assimp/assimp / HandleCommandLine

Function HandleCommandLine

tools/assimp_view/MessageProc.cpp:131–153  ·  view source on GitHub ↗

------------------------------------------------------------------------------- Handle command line parameters The function loads an asset specified on the command line as first argument Other command line parameters are not handled -------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

129// Other command line parameters are not handled
130//-------------------------------------------------------------------------------
131void HandleCommandLine(char* p_szCommand) {
132 char* sz = p_szCommand;
133 //bool bQuak = false;
134
135 if (strlen(sz) < 2) {
136 return;
137 }
138
139 if (*sz == '\"') {
140 char* sz2 = strrchr(sz,'\"');
141 if (sz2)*sz2 = 0;
142 sz++; // skip the starting quote
143 }
144
145 strcpy( g_szFileName, sz );
146 LoadAsset();
147
148 // update the history
149 UpdateHistory();
150
151 // Save the list of previous files to the registry
152 SaveHistory();
153}
154
155//-------------------------------------------------------------------------------
156// Load the light colors from the registry

Callers 1

_tWinMainFunction · 0.85

Calls 3

LoadAssetFunction · 0.85
UpdateHistoryFunction · 0.85
SaveHistoryFunction · 0.85

Tested by

no test coverage detected