|
|
@ -34,11 +34,14 @@ import androidx.core.view.WindowCompat |
|
|
import androidx.core.view.WindowInsetsCompat |
|
|
import androidx.core.view.WindowInsetsCompat |
|
|
import androidx.core.view.WindowInsetsControllerCompat |
|
|
import androidx.core.view.WindowInsetsControllerCompat |
|
|
import androidx.navigation.fragment.NavHostFragment |
|
|
import androidx.navigation.fragment.NavHostFragment |
|
|
|
|
|
import androidx.preference.PreferenceManager |
|
|
import org.yuzu.yuzu_emu.NativeLibrary |
|
|
import org.yuzu.yuzu_emu.NativeLibrary |
|
|
import org.yuzu.yuzu_emu.R |
|
|
import org.yuzu.yuzu_emu.R |
|
|
|
|
|
import org.yuzu.yuzu_emu.YuzuApplication |
|
|
import org.yuzu.yuzu_emu.databinding.ActivityEmulationBinding |
|
|
import org.yuzu.yuzu_emu.databinding.ActivityEmulationBinding |
|
|
import org.yuzu.yuzu_emu.features.settings.model.BooleanSetting |
|
|
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.IntSetting |
|
|
|
|
|
import org.yuzu.yuzu_emu.features.settings.model.Settings |
|
|
import org.yuzu.yuzu_emu.features.settings.model.SettingsViewModel |
|
|
import org.yuzu.yuzu_emu.features.settings.model.SettingsViewModel |
|
|
import org.yuzu.yuzu_emu.model.Game |
|
|
import org.yuzu.yuzu_emu.model.Game |
|
|
import org.yuzu.yuzu_emu.utils.ControllerMappingHelper |
|
|
import org.yuzu.yuzu_emu.utils.ControllerMappingHelper |
|
|
@ -107,6 +110,8 @@ class EmulationActivity : AppCompatActivity(), SensorEventListener { |
|
|
inputHandler = InputHandler() |
|
|
inputHandler = InputHandler() |
|
|
inputHandler.initialize() |
|
|
inputHandler.initialize() |
|
|
|
|
|
|
|
|
|
|
|
val preferences = PreferenceManager.getDefaultSharedPreferences(YuzuApplication.appContext) |
|
|
|
|
|
if (!preferences.getBoolean(Settings.PREF_MEMORY_WARNING_SHOWN, false)) { |
|
|
if (MemoryUtil.isLessThan(MemoryUtil.REQUIRED_MEMORY, MemoryUtil.Gb)) { |
|
|
if (MemoryUtil.isLessThan(MemoryUtil.REQUIRED_MEMORY, MemoryUtil.Gb)) { |
|
|
Toast.makeText( |
|
|
Toast.makeText( |
|
|
this, |
|
|
this, |
|
|
@ -121,6 +126,10 @@ class EmulationActivity : AppCompatActivity(), SensorEventListener { |
|
|
), |
|
|
), |
|
|
Toast.LENGTH_LONG |
|
|
Toast.LENGTH_LONG |
|
|
).show() |
|
|
).show() |
|
|
|
|
|
preferences.edit() |
|
|
|
|
|
.putBoolean(Settings.PREF_MEMORY_WARNING_SHOWN, true) |
|
|
|
|
|
.apply() |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// Start a foreground service to prevent the app from getting killed in the background |
|
|
// Start a foreground service to prevent the app from getting killed in the background |
|
|
|