Skip to content

Commit

Permalink
macOS & iOS Bugfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
BrentDaMage committed May 7, 2024
1 parent 8ac4093 commit 04ef855
Show file tree
Hide file tree
Showing 4 changed files with 80 additions and 23 deletions.
2 changes: 1 addition & 1 deletion platforms/ios/AppPlatform_iOS.mm
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
Texture AppPlatform_iOS::loadTexture(const std::string& path, bool b)
{
Texture out;
out.field_C = 1;
out.m_hasAlpha = 1;
out.field_D = 0;

std::string realPath = getAssetPath(path);
Expand Down
12 changes: 8 additions & 4 deletions platforms/ios/minecraftpeViewController.mm
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,10 @@ - (void)updateDrawSize
{
// NOTE: Swapping width & height because of device orientation
// I guess when the device is sideways, the view doesn't rotate to be upright?
Minecraft::width = self.height;
Minecraft::height = self.width;
self->_app->sizeUpdate(self.height, self.width);
Minecraft::width = self.height; // drawWidth
Minecraft::height = self.width; // drawHeight
Minecraft::setGuiScaleMultiplier(self->viewScale);
self->_app->sizeUpdate(self.height / self->viewScale, self.width / self->viewScale); // windowWidth, windowHeight
NSLog(@"Updated draw size to %d, %d\n", self.height, self.width);
}

Expand Down Expand Up @@ -180,7 +181,10 @@ - (void)viewDidLoad
animationFrameInterval = 1;
self.displayLink = nil;

g_bIsMenuBackgroundAvailable = true;
// disable this if your background panorama images aren't being bundled
Screen::setIsMenuPanoramaAvailable(true);
// disable this if your environment/clouds.png isn't being bundled
LevelRenderer::setAreCloudsAvailable(true);

AppPlatform_iOS *platform = new AppPlatform_iOS(self);
self->_platform = platform;
Expand Down
Loading

0 comments on commit 04ef855

Please sign in to comment.