diff --git a/src/MeloNX-Android/melonx-native/Android/app/src/main/AndroidManifest.xml b/src/MeloNX-Android/melonx-native/Android/app/src/main/AndroidManifest.xml index 1d276952e..7a75914da 100644 --- a/src/MeloNX-Android/melonx-native/Android/app/src/main/AndroidManifest.xml +++ b/src/MeloNX-Android/melonx-native/Android/app/src/main/AndroidManifest.xml @@ -52,7 +52,8 @@ android:exported="true" android:configChanges="orientation|screenSize|screenLayout|keyboardHidden|mnc|colorMode|density|fontScale|fontWeightAdjustment|keyboard|layoutDirection|locale|mcc|navigation|smallestScreenSize|touchscreen|uiMode" android:theme="@style/Theme.AppCompat.DayNight.NoActionBar" - android:windowSoftInputMode="adjustResize"> + android:windowSoftInputMode="adjustResize" + android:screenOrientation="landscape"> diff --git a/src/MeloNX-Android/melonx-native/Android/app/src/main/jniLibs/arm64-v8a/libRyujinx.Headless.SDL2.so b/src/MeloNX-Android/melonx-native/Android/app/src/main/jniLibs/arm64-v8a/libRyujinx.Headless.SDL2.so index 2dbafcf59..2e28bbba4 100644 Binary files a/src/MeloNX-Android/melonx-native/Android/app/src/main/jniLibs/arm64-v8a/libRyujinx.Headless.SDL2.so and b/src/MeloNX-Android/melonx-native/Android/app/src/main/jniLibs/arm64-v8a/libRyujinx.Headless.SDL2.so differ diff --git a/src/MeloNX-Android/melonx-native/Android/app/src/main/kotlin/Main.kt b/src/MeloNX-Android/melonx-native/Android/app/src/main/kotlin/Main.kt index d581d162c..3ad6a8718 100644 --- a/src/MeloNX-Android/melonx-native/Android/app/src/main/kotlin/Main.kt +++ b/src/MeloNX-Android/melonx-native/Android/app/src/main/kotlin/Main.kt @@ -16,7 +16,9 @@ import androidx.compose.foundation.background import androidx.compose.foundation.isSystemInDarkTheme import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.size +import androidx.compose.foundation.layout.width import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.runtime.SideEffect @@ -24,8 +26,10 @@ import androidx.compose.runtime.remember import androidx.compose.runtime.saveable.rememberSaveableStateHolder import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier +import androidx.compose.ui.draw.rotate import androidx.compose.ui.graphics.Color import androidx.compose.ui.graphics.graphicsLayer +import androidx.compose.ui.platform.LocalConfiguration import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp import androidx.compose.ui.viewinterop.AndroidView @@ -154,10 +158,19 @@ open class MainActivity: SDLActivity { @Composable fun SDLComposeSurface() { + val configuration = LocalConfiguration.current + + val screenHeight = configuration.screenHeightDp.dp + val screenWidth = configuration.screenWidthDp.dp + AndroidView( factory = { context -> mSurface - } + }, + modifier = Modifier + .rotate(45f) + .width(screenHeight) + .height(screenWidth) ) } diff --git a/src/MeloNX-Android/melonx-native/Sources/MeloNXModel/Ryujinx.swift b/src/MeloNX-Android/melonx-native/Sources/MeloNXModel/Ryujinx.swift index 863274832..0d2cc2485 100644 --- a/src/MeloNX-Android/melonx-native/Sources/MeloNXModel/Ryujinx.swift +++ b/src/MeloNX-Android/melonx-native/Sources/MeloNXModel/Ryujinx.swift @@ -178,9 +178,9 @@ private extension Ryujinx { args.append(contentsOf: ["--memory-manager-mode", config.memoryManagerMode]) -// args.append(contentsOf: ["--exclusive-fullscreen", String(true)]) - // args.append(contentsOf: ["--exclusive-fullscreen-width", "\(Int(UIScreen.main.bounds.width))"]) - // args.append(contentsOf: ["--exclusive-fullscreen-height", "\(Int(UIScreen.main.bounds.height))"]) + args.append(contentsOf: ["--exclusive-fullscreen", String(true)]) + args.append(contentsOf: ["--exclusive-fullscreen-width", "\(1080)"]) + args.append(contentsOf: ["--exclusive-fullscreen-height", "\(720)"]) // We don't need this. Ryujinx should handle it fine :3 // this also causes crashes in some games :3 diff --git a/src/Ryujinx.Input.SDL2/SDL2Gamepad.cs b/src/Ryujinx.Input.SDL2/SDL2Gamepad.cs index 187ca48dd..a691fcda7 100644 --- a/src/Ryujinx.Input.SDL2/SDL2Gamepad.cs +++ b/src/Ryujinx.Input.SDL2/SDL2Gamepad.cs @@ -21,10 +21,10 @@ namespace Ryujinx.Input.SDL2 // Unbound, ignored. SDL_GameControllerButton.SDL_CONTROLLER_BUTTON_INVALID, - SDL_GameControllerButton.SDL_CONTROLLER_BUTTON_A, SDL_GameControllerButton.SDL_CONTROLLER_BUTTON_B, - SDL_GameControllerButton.SDL_CONTROLLER_BUTTON_X, + SDL_GameControllerButton.SDL_CONTROLLER_BUTTON_A, SDL_GameControllerButton.SDL_CONTROLLER_BUTTON_Y, + SDL_GameControllerButton.SDL_CONTROLLER_BUTTON_X, SDL_GameControllerButton.SDL_CONTROLLER_BUTTON_LEFTSTICK, SDL_GameControllerButton.SDL_CONTROLLER_BUTTON_RIGHTSTICK, SDL_GameControllerButton.SDL_CONTROLLER_BUTTON_LEFTSHOULDER,