mirror of
https://github.com/azahar-emu/azahar.git
synced 2026-06-15 23:49:36 -04:00
parent
8a6d597dec
commit
823901a364
2 changed files with 10 additions and 9 deletions
|
|
@ -38,6 +38,7 @@ import androidx.activity.OnBackPressedCallback
|
|||
import androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||
import androidx.core.content.res.ResourcesCompat
|
||||
import androidx.core.graphics.Insets
|
||||
import androidx.core.view.get
|
||||
import androidx.core.view.ViewCompat
|
||||
import androidx.core.view.WindowInsetsCompat
|
||||
import androidx.drawerlayout.widget.DrawerLayout
|
||||
|
|
@ -652,13 +653,13 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback, Choreographer.Fram
|
|||
}
|
||||
|
||||
savestates?.forEach {
|
||||
var enableClick = true
|
||||
val text = if (it.slot == NativeLibrary.QUICKSAVE_SLOT) {
|
||||
getString(R.string.emulation_occupied_quicksave_slot, it.time)
|
||||
var text: String
|
||||
if (it.slot == NativeLibrary.QUICKSAVE_SLOT) {
|
||||
text = getString(R.string.emulation_occupied_quicksave_slot, it.time)
|
||||
} else {
|
||||
getString(R.string.emulation_occupied_state_slot, it.slot, it.time)
|
||||
text = getString(R.string.emulation_occupied_state_slot, it.slot, it.time)
|
||||
}
|
||||
popupMenu.menu.getItem(it.slot).setTitle(text).setEnabled(enableClick)
|
||||
popupMenu.menu.getItem(it.slot).setTitle(text).setEnabled(true)
|
||||
}
|
||||
|
||||
popupMenu.show()
|
||||
|
|
@ -685,7 +686,7 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback, Choreographer.Fram
|
|||
|
||||
savestates?.forEach {
|
||||
val text = getString(R.string.emulation_occupied_state_slot, it.slot, it.time)
|
||||
popupMenu.menu.getItem(it.slot - 1).setTitle(text).setEnabled(true)
|
||||
popupMenu.menu[it.slot - 1].setTitle(text).setEnabled(true)
|
||||
}
|
||||
|
||||
popupMenu.show()
|
||||
|
|
|
|||
|
|
@ -18,8 +18,8 @@
|
|||
#include "video_core/renderer_base.h"
|
||||
|
||||
bool EmuWindow_Android::OnSurfaceChanged(ANativeWindow* surface) {
|
||||
int temp_width = surface == nullptr ? 0 : ANativeWindow_getWidth(surface);
|
||||
int temp_height = surface == nullptr ? 0 : ANativeWindow_getHeight(surface);
|
||||
int temp_width = (surface == nullptr) ? 0 : ANativeWindow_getWidth(surface);
|
||||
int temp_height = (surface == nullptr) ? 0 : ANativeWindow_getHeight(surface);
|
||||
if (render_window == surface && temp_width == window_width && temp_height == window_height) {
|
||||
return false;
|
||||
}
|
||||
|
|
@ -47,7 +47,7 @@ void EmuWindow_Android::OnTouchMoved(int x, int y) {
|
|||
}
|
||||
|
||||
void EmuWindow_Android::OnFramebufferSizeChanged() {
|
||||
const bool is_portrait_mode = IsPortraitMode() && !is_secondary;
|
||||
const bool is_portrait_mode = (IsPortraitMode() && !is_secondary);
|
||||
|
||||
UpdateCurrentFramebufferLayout(window_width, window_height, is_portrait_mode);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue