diff --git a/core/hw/sh4/dyna/blockmanager.cpp b/core/hw/sh4/dyna/blockmanager.cpp index 47d91af51..75ed5129f 100644 --- a/core/hw/sh4/dyna/blockmanager.cpp +++ b/core/hw/sh4/dyna/blockmanager.cpp @@ -234,7 +234,6 @@ void bm_vmem_pagefill(void** ptr, u32 size_bytes) void bm_Reset() { - bm_ResetCache(); bm_CleanupDeletedBlocks(); protected_blocks = 0; unprotected_blocks = 0; diff --git a/core/hw/sh4/dyna/driver.cpp b/core/hw/sh4/dyna/driver.cpp index 3be32518e..a3323e1ce 100644 --- a/core/hw/sh4/dyna/driver.cpp +++ b/core/hw/sh4/dyna/driver.cpp @@ -405,7 +405,6 @@ static void recSh4_Reset(bool hard) { Sh4_int_Reset(hard); recSh4_ClearCache(); - bm_Reset(); } static void recSh4_Init() diff --git a/core/rec-ARM64/rec_arm64.cpp b/core/rec-ARM64/rec_arm64.cpp index 00cd059dd..83e50d774 100644 --- a/core/rec-ARM64/rec_arm64.cpp +++ b/core/rec-ARM64/rec_arm64.cpp @@ -1257,9 +1257,7 @@ class Arm64Assembler : public MacroAssembler if (!mmu_enabled()) { // TODO Call no_update instead (and check CpuRunning less frequently?) - Mov(x2, sizeof(Sh4RCB)); - Sub(x2, x28, x2); - Add(x2, x2, sizeof(Sh4Context)); // x2 now points to FPCB + Sub(x2, x28, offsetof(Sh4RCB, cntx)); #if RAM_SIZE_MAX == 33554432 Ubfx(w1, w29, 1, 24); #else @@ -1347,6 +1345,7 @@ class Arm64Assembler : public MacroAssembler // int intc_sched() arm64_intc_sched = GetCursorAddress(); + verify((void *)arm64_intc_sched == (void *)CodeCache); B(&intc_sched); // void no_update() @@ -2239,14 +2238,14 @@ bool ngen_Rewrite(host_context_t &context, void *faultAddress) static void generate_mainloop() { - if (mainloop != NULL) + if (mainloop != nullptr) return; compiler = new Arm64Assembler(); compiler->GenMainloop(); delete compiler; - compiler = NULL; + compiler = nullptr; } RuntimeBlockInfo* ngen_AllocateBlock() diff --git a/shell/android-studio/reicast/src/main/java/com/reicast/emulator/BaseGLActivity.java b/shell/android-studio/reicast/src/main/java/com/reicast/emulator/BaseGLActivity.java index b99de74d4..973597681 100644 --- a/shell/android-studio/reicast/src/main/java/com/reicast/emulator/BaseGLActivity.java +++ b/shell/android-studio/reicast/src/main/java/com/reicast/emulator/BaseGLActivity.java @@ -22,6 +22,7 @@ import android.view.MotionEvent; import android.view.View; import android.view.ViewConfiguration; +import android.view.Window; import com.reicast.emulator.config.Config; import com.reicast.emulator.debug.GenerateLogs; @@ -37,6 +38,10 @@ import tv.ouya.console.api.OuyaController; +import static android.view.View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR; +import static android.view.WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS; +import static android.view.WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS; + public abstract class BaseGLActivity extends Activity implements ActivityCompat.OnRequestPermissionsResultCallback { private static final int STORAGE_PERM_REQUEST = 1001; private static final int AUDIO_PERM_REQUEST = 1002; @@ -57,6 +62,15 @@ public abstract class BaseGLActivity extends Activity implements ActivityCompat. protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { + // Set the navigation bar color to 0 to avoid left over when it fades out on Android 10 + Window window = getWindow(); + window.addFlags(FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS); + window.clearFlags(FLAG_TRANSLUCENT_STATUS); + window.setNavigationBarColor(0); + window.getDecorView().setSystemUiVisibility(SYSTEM_UI_FLAG_LIGHT_STATUS_BAR); + } + if (!getFilesDir().exists()) { getFilesDir().mkdir(); }