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;
fp.read((uint8_t*)fdesc, size);
fp.close();
Renderer *svptr = renderer;
Get_display(temp);
renderer = svptr;
if (rot >= 0) {
srot = Settings->display_rotate;
Settings->display_rotate = rot;
if (renderer) {
// save ptr
Set_display(temp);
renderer = nullptr;
} else {
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) {
Settings->display_rotate = srot;
}