From 15f59fecfbc10598f3aa726825da9c81bf871c09 Mon Sep 17 00:00:00 2001 From: David Rose Date: Tue, 21 Jul 2009 01:53:33 +0000 Subject: [PATCH] check platform in contents.xml --- direct/src/plugin_npapi/ppInstance.cxx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/direct/src/plugin_npapi/ppInstance.cxx b/direct/src/plugin_npapi/ppInstance.cxx index 77563d003a..a70c11d77d 100644 --- a/direct/src/plugin_npapi/ppInstance.cxx +++ b/direct/src/plugin_npapi/ppInstance.cxx @@ -707,15 +707,19 @@ read_contents_file(const string &filename) { while (xpackage != NULL) { const char *name = xpackage->Attribute("name"); if (name != NULL && strcmp(name, "coreapi") == 0) { - get_core_api(xpackage); - return true; + const char *platform = xpackage->Attribute("platform"); + if (platform != NULL && strcmp(platform, P3D_PLUGIN_PLATFORM) == 0) { + get_core_api(xpackage); + return true; + } } xpackage = xpackage->NextSiblingElement("package"); } // Couldn't find the coreapi package description. - logfile << "No coreapi package defined in contents file.\n" << flush; + logfile << "No coreapi package defined in contents file for " + << P3D_PLUGIN_PLATFORM << "\n" << flush; return false; }