Some attempts to enable surface changes

This commit is contained in:
David Griswold 2025-03-04 19:11:34 -03:00 committed by OpenSauce04
parent 12afea9015
commit dc885ca674
2 changed files with 12 additions and 1 deletions

View File

@ -327,10 +327,20 @@ void Java_org_citra_citra_1emu_NativeLibrary_enableSecondWindow(JNIEnv* env,
[[maybe_unused]] jobject obj,jobject surf) {
s_secondary_surface = ANativeWindow_fromSurface(env, surf);
secondary_enabled = true;
bool notify = false;
if (second_window) {
notify = second_window->OnSurfaceChanged(s_secondary_surface);
}
auto& system = Core::System::GetInstance();
if (notify && system.IsPoweredOn()) {
system.GPU().Renderer().NotifySurfaceChanged();
}
LOG_INFO(Frontend, "Secondary Surface Enabled");
LOG_INFO(Frontend, "Secondary Surface changed");
}
void Java_org_citra_citra_1emu_NativeLibrary_disableSecondWindow(JNIEnv* env,
[[maybe_unused]] jobject obj) {

View File

@ -76,6 +76,7 @@ public:
void NotifySurfaceChanged() override {
main_window.NotifySurfaceChanged();
if (second_window) second_window->NotifySurfaceChanged();
}
void SwapBuffers() override;