Merge pull request #3583 from fufesou/refact/avoid_texture_neg_w_h
refact/avoid texture neg w h
This commit is contained in:
commit
a807f4371f
@ -371,8 +371,12 @@ class FfiModel with ChangeNotifier {
|
|||||||
|
|
||||||
_updateSessionWidthHeight(String id) {
|
_updateSessionWidthHeight(String id) {
|
||||||
parent.target?.canvasModel.updateViewStyle();
|
parent.target?.canvasModel.updateViewStyle();
|
||||||
|
if (display.width <= 0 || display.height <= 0) {
|
||||||
|
debugPrintStack(label: 'invalid display size (${display.width},${display.height})');
|
||||||
|
} else {
|
||||||
bind.sessionSetSize(id: id, width: display.width, height: display.height);
|
bind.sessionSetSize(id: id, width: display.width, height: display.height);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// Handle the peer info event based on [evt].
|
/// Handle the peer info event based on [evt].
|
||||||
handlePeerInfo(Map<String, dynamic> evt, String peerId) async {
|
handlePeerInfo(Map<String, dynamic> evt, String peerId) async {
|
||||||
|
@ -848,7 +848,7 @@ pub fn elevate_portable(_id: i32) {
|
|||||||
#[cfg(any(target_os = "android", target_os = "ios", feature = "flutter"))]
|
#[cfg(any(target_os = "android", target_os = "ios", feature = "flutter"))]
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn handle_incoming_voice_call(id: i32, accept: bool) {
|
pub fn handle_incoming_voice_call(id: i32, accept: bool) {
|
||||||
if let Some(client) = CLIENTS.write().unwrap().get_mut(&id) {
|
if let Some(client) = CLIENTS.read().unwrap().get(&id) {
|
||||||
allow_err!(client.tx.send(Data::VoiceCallResponse(accept)));
|
allow_err!(client.tx.send(Data::VoiceCallResponse(accept)));
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@ -856,7 +856,7 @@ pub fn handle_incoming_voice_call(id: i32, accept: bool) {
|
|||||||
#[cfg(any(target_os = "android", target_os = "ios", feature = "flutter"))]
|
#[cfg(any(target_os = "android", target_os = "ios", feature = "flutter"))]
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn close_voice_call(id: i32) {
|
pub fn close_voice_call(id: i32) {
|
||||||
if let Some(client) = CLIENTS.write().unwrap().get_mut(&id) {
|
if let Some(client) = CLIENTS.read().unwrap().get(&id) {
|
||||||
allow_err!(client.tx.send(Data::CloseVoiceCall("".to_owned())));
|
allow_err!(client.tx.send(Data::CloseVoiceCall("".to_owned())));
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user