From 24407730af729d45d5ac3af722ebea0e4ff52457 Mon Sep 17 00:00:00 2001 From: Tungstend Date: Mon, 18 Apr 2022 22:01:24 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dboat=E5=88=86=E8=BE=A8?= =?UTF-8?q?=E7=8E=87=E7=BC=A9=E6=94=BE=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../launcher/launch/boat/BoatMinecraftActivity.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/HMCLPE/src/main/java/com/tungsten/hmclpe/launcher/launch/boat/BoatMinecraftActivity.java b/HMCLPE/src/main/java/com/tungsten/hmclpe/launcher/launch/boat/BoatMinecraftActivity.java index 86ea2e25..5e5b1fe5 100644 --- a/HMCLPE/src/main/java/com/tungsten/hmclpe/launcher/launch/boat/BoatMinecraftActivity.java +++ b/HMCLPE/src/main/java/com/tungsten/hmclpe/launcher/launch/boat/BoatMinecraftActivity.java @@ -20,6 +20,8 @@ import com.tungsten.hmclpe.control.view.LayoutPanel; import com.tungsten.hmclpe.launcher.launch.GameLaunchSetting; +import net.kdt.pojavlaunch.utils.MCOptionUtils; + import cosine.boat.BoatActivity; import cosine.boat.BoatInput; import cosine.boat.keyboard.BoatKeycodes; @@ -64,6 +66,12 @@ protected void onCreate(@Nullable Bundle savedInstanceState) { @Override public void onSurfaceTextureAvailable(SurfaceTexture surface, int width, int height) { surface.setDefaultBufferSize((int) (width * scaleFactor), (int) (height * scaleFactor)); + + MCOptionUtils.load(gameLaunchSetting.game_directory); + MCOptionUtils.set("overrideWidth", String.valueOf((int) (width * scaleFactor))); + MCOptionUtils.set("overrideHeight", String.valueOf((int) (height * scaleFactor))); + MCOptionUtils.save(gameLaunchSetting.game_directory); + BoatActivity.setBoatNativeWindow(new Surface(surface)); BoatInput.setEventPipe(); startGame(gameLaunchSetting.javaPath,