Compare commits
4 Commits
android-18
...
android-18
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6f20123f17 | ||
|
|
2429877d26 | ||
|
|
444f0beaa2 | ||
|
|
b996f07495 |
@@ -1,10 +1,8 @@
|
||||
| Pull Request | Commit | Title | Author | Merged? |
|
||||
|----|----|----|----|----|
|
||||
| [12549](https://github.com/yuzu-emu/yuzu//pull/12549) | [`d3531b682`](https://github.com/yuzu-emu/yuzu//pull/12549/files) | service: hid: Implement NpadResource and NpadData | [german77](https://github.com/german77/) | Yes |
|
||||
| [12549](https://github.com/yuzu-emu/yuzu//pull/12549) | [`27259ff10`](https://github.com/yuzu-emu/yuzu//pull/12549/files) | service: hid: Implement NpadResource and NpadData | [german77](https://github.com/german77/) | Yes |
|
||||
| [12557](https://github.com/yuzu-emu/yuzu//pull/12557) | [`0f7fc9411`](https://github.com/yuzu-emu/yuzu//pull/12557/files) | KThread: Send termination interrupt to all cores a thread has affinity to | [merryhime](https://github.com/merryhime/) | Yes |
|
||||
| [12558](https://github.com/yuzu-emu/yuzu//pull/12558) | [`dace726d0`](https://github.com/yuzu-emu/yuzu//pull/12558/files) | android: Disable compression for zip exports | [t895](https://github.com/t895/) | Yes |
|
||||
| [12560](https://github.com/yuzu-emu/yuzu//pull/12560) | [`e5de3d5a7`](https://github.com/yuzu-emu/yuzu//pull/12560/files) | android: add basic support for google game dashboard | [GayPotatoEmma](https://github.com/GayPotatoEmma/) | Yes |
|
||||
| [12571](https://github.com/yuzu-emu/yuzu//pull/12571) | [`48e5e4fd1`](https://github.com/yuzu-emu/yuzu//pull/12571/files) | android: Expose more orientation options | [t895](https://github.com/t895/) | Yes |
|
||||
|
||||
|
||||
End of merge log. You can find the original README.md below the break.
|
||||
|
||||
@@ -31,9 +31,6 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
||||
android:dataExtractionRules="@xml/data_extraction_rules_api_31"
|
||||
android:enableOnBackInvokedCallback="true">
|
||||
|
||||
<meta-data android:name="android.game_mode_config"
|
||||
android:resource="@xml/game_mode_config" />
|
||||
|
||||
<activity
|
||||
android:name="org.yuzu.yuzu_emu.ui.main.MainActivity"
|
||||
android:exported="true"
|
||||
|
||||
@@ -79,18 +79,7 @@ object Settings {
|
||||
const val PREF_THEME_MODE = "ThemeMode"
|
||||
const val PREF_BLACK_BACKGROUNDS = "BlackBackgrounds"
|
||||
|
||||
enum class EmulationOrientation(val int: Int) {
|
||||
Unspecified(0),
|
||||
SensorLandscape(5),
|
||||
Landscape(1),
|
||||
ReverseLandscape(2),
|
||||
SensorPortrait(6),
|
||||
Portrait(4),
|
||||
ReversePortrait(3);
|
||||
|
||||
companion object {
|
||||
fun from(int: Int): EmulationOrientation =
|
||||
entries.firstOrNull { it.int == int } ?: Unspecified
|
||||
}
|
||||
}
|
||||
const val LayoutOption_Unspecified = 0
|
||||
const val LayoutOption_MobilePortrait = 4
|
||||
const val LayoutOption_MobileLandscape = 5
|
||||
}
|
||||
|
||||
@@ -50,7 +50,6 @@ import org.yuzu.yuzu_emu.databinding.FragmentEmulationBinding
|
||||
import org.yuzu.yuzu_emu.features.settings.model.BooleanSetting
|
||||
import org.yuzu.yuzu_emu.features.settings.model.IntSetting
|
||||
import org.yuzu.yuzu_emu.features.settings.model.Settings
|
||||
import org.yuzu.yuzu_emu.features.settings.model.Settings.EmulationOrientation
|
||||
import org.yuzu.yuzu_emu.features.settings.utils.SettingsFile
|
||||
import org.yuzu.yuzu_emu.model.DriverViewModel
|
||||
import org.yuzu.yuzu_emu.model.Game
|
||||
@@ -100,7 +99,6 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback {
|
||||
*/
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
updateOrientation()
|
||||
|
||||
val intentUri: Uri? = requireActivity().intent.data
|
||||
var intentGame: Game? = null
|
||||
@@ -460,23 +458,13 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback {
|
||||
@SuppressLint("SourceLockedOrientationActivity")
|
||||
private fun updateOrientation() {
|
||||
emulationActivity?.let {
|
||||
val orientationSetting =
|
||||
EmulationOrientation.from(IntSetting.RENDERER_SCREEN_LAYOUT.getInt())
|
||||
it.requestedOrientation = when (orientationSetting) {
|
||||
EmulationOrientation.Unspecified -> ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED
|
||||
EmulationOrientation.SensorLandscape ->
|
||||
it.requestedOrientation = when (IntSetting.RENDERER_SCREEN_LAYOUT.getInt()) {
|
||||
Settings.LayoutOption_MobileLandscape ->
|
||||
ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE
|
||||
|
||||
EmulationOrientation.Landscape -> ActivityInfo.SCREEN_ORIENTATION_USER_LANDSCAPE
|
||||
EmulationOrientation.ReverseLandscape ->
|
||||
ActivityInfo.SCREEN_ORIENTATION_REVERSE_LANDSCAPE
|
||||
|
||||
EmulationOrientation.SensorPortrait ->
|
||||
ActivityInfo.SCREEN_ORIENTATION_SENSOR_PORTRAIT
|
||||
|
||||
EmulationOrientation.Portrait -> ActivityInfo.SCREEN_ORIENTATION_USER_PORTRAIT
|
||||
EmulationOrientation.ReversePortrait ->
|
||||
ActivityInfo.SCREEN_ORIENTATION_REVERSE_PORTRAIT
|
||||
Settings.LayoutOption_MobilePortrait ->
|
||||
ActivityInfo.SCREEN_ORIENTATION_USER_PORTRAIT
|
||||
Settings.LayoutOption_Unspecified -> ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED
|
||||
else -> ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -663,7 +651,7 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback {
|
||||
@SuppressLint("SourceLockedOrientationActivity")
|
||||
private fun startConfiguringControls() {
|
||||
// Lock the current orientation to prevent editing inconsistencies
|
||||
if (IntSetting.RENDERER_SCREEN_LAYOUT.getInt() == EmulationOrientation.Unspecified.int) {
|
||||
if (IntSetting.RENDERER_SCREEN_LAYOUT.getInt() == Settings.LayoutOption_Unspecified) {
|
||||
emulationActivity?.let {
|
||||
it.requestedOrientation =
|
||||
if (resources.configuration.orientation == Configuration.ORIENTATION_PORTRAIT) {
|
||||
@@ -681,7 +669,7 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback {
|
||||
binding.doneControlConfig.visibility = View.GONE
|
||||
binding.surfaceInputOverlay.setIsInEditMode(false)
|
||||
// Unlock the orientation if it was locked for editing
|
||||
if (IntSetting.RENDERER_SCREEN_LAYOUT.getInt() == EmulationOrientation.Unspecified.int) {
|
||||
if (IntSetting.RENDERER_SCREEN_LAYOUT.getInt() == Settings.LayoutOption_Unspecified) {
|
||||
emulationActivity?.let {
|
||||
it.requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED
|
||||
}
|
||||
|
||||
@@ -118,23 +118,15 @@
|
||||
</integer-array>
|
||||
|
||||
<string-array name="rendererScreenLayoutNames">
|
||||
<item>@string/screen_layout_auto</item>
|
||||
<item>@string/screen_layout_sensor_landscape</item>
|
||||
<item>@string/screen_layout_landscape</item>
|
||||
<item>@string/screen_layout_reverse_landscape</item>
|
||||
<item>@string/screen_layout_sensor_portrait</item>
|
||||
<item>@string/screen_layout_portrait</item>
|
||||
<item>@string/screen_layout_reverse_portrait</item>
|
||||
<item>@string/screen_layout_auto</item>
|
||||
</string-array>
|
||||
|
||||
<integer-array name="rendererScreenLayoutValues">
|
||||
<item>0</item>
|
||||
<item>5</item>
|
||||
<item>1</item>
|
||||
<item>2</item>
|
||||
<item>6</item>
|
||||
<item>4</item>
|
||||
<item>3</item>
|
||||
<item>0</item>
|
||||
</integer-array>
|
||||
|
||||
<string-array name="rendererAspectRatioNames">
|
||||
|
||||
@@ -463,13 +463,9 @@
|
||||
<string name="anti_aliasing_smaa">SMAA</string>
|
||||
|
||||
<!-- Screen Layouts -->
|
||||
<string name="screen_layout_auto">Auto</string>
|
||||
<string name="screen_layout_sensor_landscape">Sensor landscape</string>
|
||||
<string name="screen_layout_landscape">Landscape</string>
|
||||
<string name="screen_layout_reverse_landscape">Reverse landscape</string>
|
||||
<string name="screen_layout_sensor_portrait">Sensor portrait</string>
|
||||
<string name="screen_layout_portrait">Portrait</string>
|
||||
<string name="screen_layout_reverse_portrait">Reverse portrait</string>
|
||||
<string name="screen_layout_auto">Auto</string>
|
||||
|
||||
<!-- Aspect Ratios -->
|
||||
<string name="ratio_default">Default (16:9)</string>
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<game-mode-config
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:supportsBatteryGameMode="true"
|
||||
android:supportsPerformanceGameMode="true"
|
||||
android:allowGameDownscaling="false"
|
||||
android:allowGameFpsOverride="false"/>
|
||||
@@ -120,12 +120,11 @@ void NPad::ControllerUpdate(Core::HID::ControllerTriggerType type, std::size_t c
|
||||
ControllerUpdate(Core::HID::ControllerTriggerType::Battery, controller_idx);
|
||||
return;
|
||||
}
|
||||
if (controller_idx >= controller_data.size()) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (std::size_t aruid_index = 0; aruid_index < AruidIndexMax; aruid_index++) {
|
||||
if (controller_idx >= controller_data[aruid_index].size()) {
|
||||
return;
|
||||
}
|
||||
|
||||
auto* data = applet_resource_holder.applet_resource->GetAruidDataByIndex(aruid_index);
|
||||
|
||||
if (!data->flag.is_assigned) {
|
||||
@@ -465,7 +464,7 @@ void NPad::OnUpdate(const Core::Timing::CoreTiming& core_timing) {
|
||||
continue;
|
||||
}
|
||||
|
||||
for (std::size_t i = 0; i < controller_data[aruid_index].size(); ++i) {
|
||||
for (std::size_t i = 0; i < controller_data.size(); ++i) {
|
||||
auto& controller = controller_data[aruid_index][i];
|
||||
controller.shared_memory =
|
||||
&data->shared_memory_format->npad.npad_entry[i].internal_state;
|
||||
|
||||
Reference in New Issue
Block a user