1
0
forked from MeloNX/MeloNX
This commit is contained in:
Daniil Vinogradov 2025-03-13 01:29:36 +01:00
parent 275c07d473
commit 369bcd8d66
5 changed files with 21 additions and 7 deletions

View File

@ -52,7 +52,8 @@
android:exported="true" android:exported="true"
android:configChanges="orientation|screenSize|screenLayout|keyboardHidden|mnc|colorMode|density|fontScale|fontWeightAdjustment|keyboard|layoutDirection|locale|mcc|navigation|smallestScreenSize|touchscreen|uiMode" 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:theme="@style/Theme.AppCompat.DayNight.NoActionBar"
android:windowSoftInputMode="adjustResize"> android:windowSoftInputMode="adjustResize"
android:screenOrientation="landscape">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" /> <category android:name="android.intent.category.LAUNCHER" />

View File

@ -16,7 +16,9 @@ import androidx.compose.foundation.background
import androidx.compose.foundation.isSystemInDarkTheme import androidx.compose.foundation.isSystemInDarkTheme
import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.size import androidx.compose.foundation.layout.size
import androidx.compose.foundation.layout.width
import androidx.compose.material3.Text import androidx.compose.material3.Text
import androidx.compose.runtime.Composable import androidx.compose.runtime.Composable
import androidx.compose.runtime.SideEffect import androidx.compose.runtime.SideEffect
@ -24,8 +26,10 @@ import androidx.compose.runtime.remember
import androidx.compose.runtime.saveable.rememberSaveableStateHolder import androidx.compose.runtime.saveable.rememberSaveableStateHolder
import androidx.compose.ui.Alignment import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.rotate
import androidx.compose.ui.graphics.Color import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.graphicsLayer import androidx.compose.ui.graphics.graphicsLayer
import androidx.compose.ui.platform.LocalConfiguration
import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp import androidx.compose.ui.unit.sp
import androidx.compose.ui.viewinterop.AndroidView import androidx.compose.ui.viewinterop.AndroidView
@ -154,10 +158,19 @@ open class MainActivity: SDLActivity {
@Composable @Composable
fun SDLComposeSurface() { fun SDLComposeSurface() {
val configuration = LocalConfiguration.current
val screenHeight = configuration.screenHeightDp.dp
val screenWidth = configuration.screenWidthDp.dp
AndroidView( AndroidView(
factory = { context -> factory = { context ->
mSurface mSurface
} },
modifier = Modifier
.rotate(45f)
.width(screenHeight)
.height(screenWidth)
) )
} }

View File

@ -178,9 +178,9 @@ private extension Ryujinx {
args.append(contentsOf: ["--memory-manager-mode", config.memoryManagerMode]) args.append(contentsOf: ["--memory-manager-mode", config.memoryManagerMode])
// args.append(contentsOf: ["--exclusive-fullscreen", String(true)]) args.append(contentsOf: ["--exclusive-fullscreen", String(true)])
// args.append(contentsOf: ["--exclusive-fullscreen-width", "\(Int(UIScreen.main.bounds.width))"]) args.append(contentsOf: ["--exclusive-fullscreen-width", "\(1080)"])
// args.append(contentsOf: ["--exclusive-fullscreen-height", "\(Int(UIScreen.main.bounds.height))"]) args.append(contentsOf: ["--exclusive-fullscreen-height", "\(720)"])
// We don't need this. Ryujinx should handle it fine :3 // We don't need this. Ryujinx should handle it fine :3
// this also causes crashes in some games :3 // this also causes crashes in some games :3

View File

@ -21,10 +21,10 @@ namespace Ryujinx.Input.SDL2
// Unbound, ignored. // Unbound, ignored.
SDL_GameControllerButton.SDL_CONTROLLER_BUTTON_INVALID, SDL_GameControllerButton.SDL_CONTROLLER_BUTTON_INVALID,
SDL_GameControllerButton.SDL_CONTROLLER_BUTTON_A,
SDL_GameControllerButton.SDL_CONTROLLER_BUTTON_B, 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_Y,
SDL_GameControllerButton.SDL_CONTROLLER_BUTTON_X,
SDL_GameControllerButton.SDL_CONTROLLER_BUTTON_LEFTSTICK, SDL_GameControllerButton.SDL_CONTROLLER_BUTTON_LEFTSTICK,
SDL_GameControllerButton.SDL_CONTROLLER_BUTTON_RIGHTSTICK, SDL_GameControllerButton.SDL_CONTROLLER_BUTTON_RIGHTSTICK,
SDL_GameControllerButton.SDL_CONTROLLER_BUTTON_LEFTSHOULDER, SDL_GameControllerButton.SDL_CONTROLLER_BUTTON_LEFTSHOULDER,