mirror of
https://github.com/yuzu-emu/yuzu-mainline.git
synced 2024-12-12 13:34:18 +01:00
android: Hide loading animation on first frame
This commit is contained in:
parent
f75363177e
commit
09f993899e
@ -9,6 +9,7 @@
|
||||
#include "input_common/drivers/virtual_gamepad.h"
|
||||
#include "input_common/main.h"
|
||||
#include "jni/emu_window/emu_window.h"
|
||||
#include "jni/native.h"
|
||||
|
||||
void EmuWindow_Android::OnSurfaceChanged(ANativeWindow* surface) {
|
||||
m_window_width = ANativeWindow_getWidth(surface);
|
||||
@ -57,6 +58,13 @@ void EmuWindow_Android::OnRemoveNfcTag() {
|
||||
m_input_subsystem->GetVirtualAmiibo()->CloseAmiibo();
|
||||
}
|
||||
|
||||
void EmuWindow_Android::OnFrameDisplayed() {
|
||||
if (!m_first_frame) {
|
||||
EmulationSession::GetInstance().OnEmulationStarted();
|
||||
m_first_frame = true;
|
||||
}
|
||||
}
|
||||
|
||||
EmuWindow_Android::EmuWindow_Android(InputCommon::InputSubsystem* input_subsystem,
|
||||
ANativeWindow* surface,
|
||||
std::shared_ptr<Common::DynamicLibrary> driver_library)
|
||||
|
@ -45,7 +45,7 @@ public:
|
||||
float gyro_z, float accel_x, float accel_y, float accel_z);
|
||||
void OnReadNfcTag(std::span<u8> data);
|
||||
void OnRemoveNfcTag();
|
||||
void OnFrameDisplayed() override {}
|
||||
void OnFrameDisplayed() override;
|
||||
|
||||
std::unique_ptr<Core::Frontend::GraphicsContext> CreateSharedContext() const override {
|
||||
return {std::make_unique<GraphicsContext_Android>(m_driver_library)};
|
||||
@ -61,4 +61,6 @@ private:
|
||||
float m_window_height{};
|
||||
|
||||
std::shared_ptr<Common::DynamicLibrary> m_driver_library;
|
||||
|
||||
bool m_first_frame = false;
|
||||
};
|
||||
|
@ -372,8 +372,6 @@ void EmulationSession::RunEmulation() {
|
||||
m_system.InitializeDebugger();
|
||||
}
|
||||
|
||||
OnEmulationStarted();
|
||||
|
||||
while (true) {
|
||||
{
|
||||
[[maybe_unused]] std::unique_lock lock(m_mutex);
|
||||
|
@ -52,9 +52,10 @@ public:
|
||||
void OnGamepadDisconnectEvent([[maybe_unused]] int index);
|
||||
SoftwareKeyboard::AndroidKeyboard* SoftwareKeyboard();
|
||||
|
||||
static void OnEmulationStarted();
|
||||
|
||||
private:
|
||||
static void LoadDiskCacheProgress(VideoCore::LoadCallbackStage stage, int progress, int max);
|
||||
static void OnEmulationStarted();
|
||||
static void OnEmulationStopped(Core::SystemResultStatus result);
|
||||
|
||||
private:
|
||||
|
Loading…
Reference in New Issue
Block a user