warning for apple rosetta

This commit is contained in:
minjaesong
2023-06-24 02:06:22 +09:00
parent 49b2011ea0
commit 592e489411
3 changed files with 9 additions and 5 deletions

Binary file not shown.

View File

@@ -13,6 +13,8 @@
"GAME_32BIT_WARNING1": "It looks like youre running a 32-Bit version of Java.",
"GAME_32BIT_WARNING2": "Please download and install the latest 64-Bit Java at:",
"GAME_32BIT_WARNING3": "https://www.java.com/en/download/",
"GAME_APPLE_ROSETTA_WARNING1": "It seems you are using a Mac with Apple Silicon but running the x86 build of the game.",
"GAME_APPLE_ROSETTA_WARNING2": "Please use the native build for improved performance and the gameplay experiences.",
"MENU_OPTION_STREAMERS_LAYOUT": "Chat Overlay",
"MENU_LABEL_RESTART_REQUIRED": "Restart Required",
"MENU_LABEL_KEYBOARD_LAYOUT": "Keyboard Layout",

View File

@@ -122,9 +122,9 @@ class TitleScreen(batch: FlippingSpriteBatch) : IngameInstance(batch) {
private lateinit var worldFBO: FloatFrameBuffer
private val warning32bitJavaIcon = TextureRegion(Texture(Gdx.files.internal("assets/graphics/gui/32_bit_warning.tga")))
private val warningAppleRosettaIcon = TextureRegion(Texture(Gdx.files.internal("assets/graphics/gui/apple_rosetta_warning.tga")))
init {
warning32bitJavaIcon.flip(false, false)
gameUpdateGovernor = ConsistentUpdateRate.also { it.reset() }
}
@@ -346,10 +346,8 @@ class TitleScreen(batch: FlippingSpriteBatch) : IngameInstance(batch) {
}
// warn: rosetta on Apple M-chips
else if (App.getUndesirableConditions() == "apple_execution_through_rosetta") {
texts = listOf(
"It seems you are using a Mac with Apple Silicon but running the game through Rosetta.",
"A native build for the game is available which runs much faster than current version."
)
Toolkit.drawCentered(batch, warningAppleRosettaIcon, yoff)
texts = (1..2).map { Lang.get("GAME_APPLE_ROSETTA_WARNING$it") }
textcols = texts.map { Color.WHITE }
}
@@ -399,6 +397,7 @@ class TitleScreen(batch: FlippingSpriteBatch) : IngameInstance(batch) {
uiRemoCon.dispose()
demoWorld.dispose()
warning32bitJavaIcon.texture.dispose()
warningAppleRosettaIcon.texture.dispose()
}
override fun inputStrobed(e: TerrarumKeyboardEvent) {