mirror of
https://github.com/Lime3DS/Lime3DS.git
synced 2026-07-10 01:34:41 -06:00
parent
8a6d597dec
commit
823901a364
@ -38,6 +38,7 @@ import androidx.activity.OnBackPressedCallback
|
|||||||
import androidx.coordinatorlayout.widget.CoordinatorLayout
|
import androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||||
import androidx.core.content.res.ResourcesCompat
|
import androidx.core.content.res.ResourcesCompat
|
||||||
import androidx.core.graphics.Insets
|
import androidx.core.graphics.Insets
|
||||||
|
import androidx.core.view.get
|
||||||
import androidx.core.view.ViewCompat
|
import androidx.core.view.ViewCompat
|
||||||
import androidx.core.view.WindowInsetsCompat
|
import androidx.core.view.WindowInsetsCompat
|
||||||
import androidx.drawerlayout.widget.DrawerLayout
|
import androidx.drawerlayout.widget.DrawerLayout
|
||||||
@ -652,13 +653,13 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback, Choreographer.Fram
|
|||||||
}
|
}
|
||||||
|
|
||||||
savestates?.forEach {
|
savestates?.forEach {
|
||||||
var enableClick = true
|
var text: String
|
||||||
val text = if (it.slot == NativeLibrary.QUICKSAVE_SLOT) {
|
if (it.slot == NativeLibrary.QUICKSAVE_SLOT) {
|
||||||
getString(R.string.emulation_occupied_quicksave_slot, it.time)
|
text = getString(R.string.emulation_occupied_quicksave_slot, it.time)
|
||||||
} else {
|
} 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()
|
popupMenu.show()
|
||||||
@ -685,7 +686,7 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback, Choreographer.Fram
|
|||||||
|
|
||||||
savestates?.forEach {
|
savestates?.forEach {
|
||||||
val text = getString(R.string.emulation_occupied_state_slot, it.slot, it.time)
|
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()
|
popupMenu.show()
|
||||||
|
|||||||
@ -18,8 +18,8 @@
|
|||||||
#include "video_core/renderer_base.h"
|
#include "video_core/renderer_base.h"
|
||||||
|
|
||||||
bool EmuWindow_Android::OnSurfaceChanged(ANativeWindow* surface) {
|
bool EmuWindow_Android::OnSurfaceChanged(ANativeWindow* surface) {
|
||||||
int temp_width = surface == nullptr ? 0 : ANativeWindow_getWidth(surface);
|
int temp_width = (surface == nullptr) ? 0 : ANativeWindow_getWidth(surface);
|
||||||
int temp_height = surface == nullptr ? 0 : ANativeWindow_getHeight(surface);
|
int temp_height = (surface == nullptr) ? 0 : ANativeWindow_getHeight(surface);
|
||||||
if (render_window == surface && temp_width == window_width && temp_height == window_height) {
|
if (render_window == surface && temp_width == window_width && temp_height == window_height) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -47,7 +47,7 @@ void EmuWindow_Android::OnTouchMoved(int x, int y) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void EmuWindow_Android::OnFramebufferSizeChanged() {
|
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);
|
UpdateCurrentFramebufferLayout(window_width, window_height, is_portrait_mode);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user