fix multidisplay mode (#21067)

This commit is contained in:
gemu 2024-03-31 08:16:15 +02:00 committed by GitHub
parent 71e666462c
commit e336913b32
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 13 additions and 7 deletions

View File

@ -638,14 +638,20 @@ void DisplayText(void)
model = Settings->display_model; model = Settings->display_model;
fp.read((uint8_t*)fdesc, size); fp.read((uint8_t*)fdesc, size);
fp.close(); fp.close();
Renderer *svptr = renderer; if (renderer) {
Get_display(temp); // save ptr
renderer = svptr; Set_display(temp);
if (rot >= 0) { renderer = nullptr;
srot = Settings->display_rotate; } else {
Settings->display_rotate = rot; Renderer *svptr = renderer;
Get_display(temp);
renderer = svptr;
if (rot >= 0) {
srot = Settings->display_rotate;
Settings->display_rotate = rot;
}
} }
renderer = Init_uDisplay(fdesc); renderer = Init_uDisplay(fdesc);
if (rot >= 0) { if (rot >= 0) {
Settings->display_rotate = srot; Settings->display_rotate = srot;
} }