mirror of
https://github.com/Lime3DS/Lime3DS.git
synced 2025-03-26 15:44:21 +01:00
Some attempts to enable surface changes
This commit is contained in:
parent
12afea9015
commit
dc885ca674
@ -327,10 +327,20 @@ void Java_org_citra_citra_1emu_NativeLibrary_enableSecondWindow(JNIEnv* env,
|
|||||||
[[maybe_unused]] jobject obj,jobject surf) {
|
[[maybe_unused]] jobject obj,jobject surf) {
|
||||||
s_secondary_surface = ANativeWindow_fromSurface(env, surf);
|
s_secondary_surface = ANativeWindow_fromSurface(env, surf);
|
||||||
secondary_enabled = true;
|
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,
|
void Java_org_citra_citra_1emu_NativeLibrary_disableSecondWindow(JNIEnv* env,
|
||||||
[[maybe_unused]] jobject obj) {
|
[[maybe_unused]] jobject obj) {
|
||||||
|
|
||||||
|
@ -76,6 +76,7 @@ public:
|
|||||||
|
|
||||||
void NotifySurfaceChanged() override {
|
void NotifySurfaceChanged() override {
|
||||||
main_window.NotifySurfaceChanged();
|
main_window.NotifySurfaceChanged();
|
||||||
|
if (second_window) second_window->NotifySurfaceChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
void SwapBuffers() override;
|
void SwapBuffers() override;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user