Android: Convert EmulationActivity to Kotlin

This commit is contained in:
Charles Lombardo 2023-06-03 22:23:30 -04:00
parent 252d3f353a
commit 03675f7677
5 changed files with 1075 additions and 1308 deletions

View File

@ -50,7 +50,7 @@ class RiivolutionBootActivity : AppCompatActivity() {
binding.textSdRoot.text = getString(R.string.riivolution_sd_root, "$loadPath/Riivolution")
binding.buttonStart.setOnClickListener {
if (patches != null) patches!!.saveConfig()
EmulationActivity.launch(this, path, true)
EmulationActivity.launch(this, path!!, true)
}
lifecycleScope.launch {

View File

@ -319,7 +319,8 @@ public final class EmulationFragment extends Fragment implements SurfaceHolder.C
}
else
{
if (!EmulationActivity.getHasUserPausedEmulation() && !NativeLibrary.IsShowingAlertMessage())
if (!EmulationActivity.Companion.getHasUserPausedEmulation() &&
!NativeLibrary.IsShowingAlertMessage())
{
Log.debug("[EmulationFragment] Resuming emulation.");
NativeLibrary.UnPauseEmulation();

View File

@ -196,7 +196,7 @@ public final class MenuFragment extends Fragment implements View.OnClickListener
private void updatePauseUnpauseVisibility()
{
boolean paused = EmulationActivity.getHasUserPausedEmulation();
boolean paused = EmulationActivity.Companion.getHasUserPausedEmulation();
mBinding.menuUnpauseEmulation.setVisibility(paused ? View.VISIBLE : View.GONE);
mBinding.menuPauseEmulation.setVisibility(paused ? View.GONE : View.VISIBLE);