mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 10:54:24 -04:00
Merge branch 'release/1.9.x'
This commit is contained in:
commit
7b9efb32af
@ -73,7 +73,7 @@ class Standalone:
|
||||
|
||||
self.tempDir = Filename.temporary("", self.basename, "") + "/"
|
||||
self.tempDir.makeDir()
|
||||
self.host = HostInfo(PandaSystem.getPackageHostUrl(), appRunner = appRunner, hostDir = self.tempDir, asMirror = False, perPlatform = True)
|
||||
self.host = HostInfo(PandaSystem.getPackageHostUrl(), appRunner = appRunner, hostDir = self.tempDir, asMirror = False)
|
||||
|
||||
self.http = HTTPClient.getGlobalPtr()
|
||||
if not self.host.hasContentsFile:
|
||||
@ -233,7 +233,7 @@ class PackageTree:
|
||||
if hostUrl in self.hosts:
|
||||
return self.hosts[hostUrl]
|
||||
|
||||
host = HostInfo(hostUrl, appRunner = appRunner, hostDir = self.hostDir, asMirror = False, perPlatform = False)
|
||||
host = HostInfo(hostUrl, appRunner = appRunner, hostDir = self.hostDir, asMirror = False)
|
||||
if not host.hasContentsFile:
|
||||
if not host.readContentsFile():
|
||||
if not host.downloadContentsFile(self.http):
|
||||
@ -587,15 +587,22 @@ class Installer:
|
||||
for package in pkgTree.packages.values():
|
||||
xpackage = TiXmlElement('package')
|
||||
xpackage.SetAttribute('name', package.packageName)
|
||||
|
||||
filename = package.packageName + "/"
|
||||
|
||||
if package.packageVersion:
|
||||
xpackage.SetAttribute('version', package.packageVersion)
|
||||
filename += package.packageVersion + "/"
|
||||
|
||||
if package.platform:
|
||||
xpackage.SetAttribute('platform', package.platform)
|
||||
filename += package.platform + "/"
|
||||
assert package.platform == platform
|
||||
xpackage.SetAttribute('per_platform', '0')
|
||||
if package.packageVersion:
|
||||
xpackage.SetAttribute('version', version)
|
||||
xpackage.SetAttribute('filename', package.packageName + "/" + package.packageVersion + "/" + package.descFileBasename)
|
||||
else:
|
||||
xpackage.SetAttribute('filename', package.packageName + "/" + package.descFileBasename)
|
||||
|
||||
xpackage.SetAttribute('per_platform', '1')
|
||||
|
||||
filename += package.descFileBasename
|
||||
xpackage.SetAttribute('filename', filename)
|
||||
xcontents.InsertEndChild(xpackage)
|
||||
|
||||
doc.InsertEndChild(xcontents)
|
||||
|
@ -271,8 +271,16 @@ LoadTexture(Rocket::Core::TextureHandle& texture_handle,
|
||||
// Since libRocket may make layout decisions based on the size of
|
||||
// the image, it's important that we give it the original size of
|
||||
// the image file in order to produce consistent results.
|
||||
texture_dimensions.x = tex->get_orig_file_x_size();
|
||||
texture_dimensions.y = tex->get_orig_file_y_size();
|
||||
int width = tex->get_orig_file_x_size();
|
||||
int height = tex->get_orig_file_y_size();
|
||||
if (width == 0 && height == 0) {
|
||||
// This shouldn't happen unless someone is playing very strange
|
||||
// tricks with the TexturePool, but we might as well handle it.
|
||||
width = tex->get_x_size();
|
||||
height = tex->get_y_size();
|
||||
}
|
||||
texture_dimensions.x = width;
|
||||
texture_dimensions.y = height;
|
||||
|
||||
tex->ref();
|
||||
texture_handle = (Rocket::Core::TextureHandle) tex.p();
|
||||
@ -307,7 +315,7 @@ GenerateTexture(Rocket::Core::TextureHandle& texture_handle,
|
||||
const unsigned char *src_ptr = source + (src_stride * source_dimensions.y);
|
||||
unsigned char *dst_ptr = &image[0];
|
||||
|
||||
for (; src_ptr >= source; dst_ptr += dst_stride) {
|
||||
for (; src_ptr > source; dst_ptr += dst_stride) {
|
||||
src_ptr -= src_stride;
|
||||
for (size_t i = 0; i < src_stride; i += 4) {
|
||||
dst_ptr[i + 0] = src_ptr[i + 2];
|
||||
|
Loading…
x
Reference in New Issue
Block a user