win resolution && api

Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
21pages
2023-02-09 15:53:51 +08:00
parent 340ec0975f
commit 91a2a5b56e
9 changed files with 255 additions and 4 deletions

View File

@@ -529,7 +529,13 @@ pub fn session_switch_sides(id: String) {
}
}
pub fn session_set_size(_id: String, _width: i32, _height: i32) {
pub fn session_change_resolution(id: String, width: i32, height: i32) {
if let Some(session) = SESSIONS.read().unwrap().get(&id) {
session.change_resolution(width, height);
}
}
pub fn session_set_size(_id: String, _width: i32, _height: i32) {
#[cfg(feature = "flutter_texture_render")]
if let Some(session) = SESSIONS.write().unwrap().get_mut(&_id) {
session.set_size(_width, _height);