mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-18 03:15:34 +08:00
Build debug string by consecutive calls to XPLMDebugString
snprintf was not supported by MSVC for a very long time. It got added the first time in MSVC 2015. To be able to build libxplanemp with earlier versions, don't use snprintf but just pass the debug message in multiple consecutive calls to XPLMDebugString.
This commit is contained in:
@@ -347,10 +347,11 @@ int OBJ_LoadModel(const char * inFilePath)
|
||||
tex_path += ".png";
|
||||
sObjects.back().texnum = OBJ_LoadTexture(tex_path.c_str(), false);
|
||||
if(sObjects.back().texnum == 0) {
|
||||
char debug[500];
|
||||
snprintf(debug, 500, "WARNING: %s failed to load for %s.\n", tex_path.c_str(),inFilePath);
|
||||
debug[499] = '\0';
|
||||
XPLMDebugString(debug);
|
||||
XPLMDebugString("WARNING: ");
|
||||
XPLMDebugString(tex_path.c_str());
|
||||
XPLMDebugString(" failed to load for ");
|
||||
XPLMDebugString(inFilePath);
|
||||
XPLMDebugString("\n");
|
||||
}
|
||||
|
||||
tex_path = path;
|
||||
|
||||
Reference in New Issue
Block a user