Merge branch 'master' into password
This commit is contained in:
commit
68f28798d5
@ -975,7 +975,7 @@ class CursorModel with ChangeNotifier {
|
||||
final image = await img.decodeImageFromPixels(
|
||||
rgba, width, height, ui.PixelFormat.rgba8888);
|
||||
_image = image;
|
||||
if (await _updateCache(image, id, width, height)) {
|
||||
if (await _updateCache(rgba, image, id, width, height)) {
|
||||
_images[id] = Tuple3(image, _hotx, _hoty);
|
||||
} else {
|
||||
_hotx = 0;
|
||||
@ -989,22 +989,25 @@ class CursorModel with ChangeNotifier {
|
||||
}
|
||||
}
|
||||
|
||||
Future<bool> _updateCache(ui.Image image, int id, int w, int h) async {
|
||||
ui.ImageByteFormat imgFormat = ui.ImageByteFormat.png;
|
||||
Future<bool> _updateCache(
|
||||
Uint8List rgba, ui.Image image, int id, int w, int h) async {
|
||||
Uint8List? data;
|
||||
img2.Image? imgOrigin;
|
||||
if (Platform.isWindows) {
|
||||
imgFormat = ui.ImageByteFormat.rawRgba;
|
||||
imgOrigin = img2.Image.fromBytes(w, h, rgba, format: img2.Format.rgba);
|
||||
data = imgOrigin.getBytes(format: img2.Format.bgra);
|
||||
} else {
|
||||
ByteData? imgBytes =
|
||||
await image.toByteData(format: ui.ImageByteFormat.png);
|
||||
if (imgBytes == null) {
|
||||
return false;
|
||||
}
|
||||
data = imgBytes.buffer.asUint8List();
|
||||
}
|
||||
|
||||
ByteData? imgBytes = await image.toByteData(format: imgFormat);
|
||||
if (imgBytes == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Uint8List? data = imgBytes.buffer.asUint8List();
|
||||
_cache = CursorData(
|
||||
peerId: this.id,
|
||||
id: id,
|
||||
image: Platform.isWindows ? img2.Image.fromBytes(w, h, data) : null,
|
||||
image: imgOrigin,
|
||||
scale: 1.0,
|
||||
data: data,
|
||||
hotxOrigin: _hotx,
|
||||
|
@ -298,7 +298,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Language", "Linguaggio"),
|
||||
("Keep RustDesk background service", "Mantieni il servizio di RustDesk in background"),
|
||||
("Ignore Battery Optimizations", "Ignora le ottimizzazioni della batteria"),
|
||||
("android_open_battery_optimizations_tip", ""),
|
||||
("android_open_battery_optimizations_tip", "Se si desidera disabilitare questa funzione, andare nelle impostazioni dell'applicazione RustDesk, aprire la sezione [Batteria] e deselezionare [Senza restrizioni]."),
|
||||
("Connection not allowed", "Connessione non consentita"),
|
||||
("Legacy mode", "Modalità legacy"),
|
||||
("Map mode", "Modalità mappa"),
|
||||
@ -369,7 +369,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Write a message", "Scrivi un messaggio"),
|
||||
("Prompt", ""),
|
||||
("Please wait for confirmation of UAC...", "Attendi la conferma dell'UAC..."),
|
||||
("elevated_foreground_window_tip", ""),
|
||||
("elevated_foreground_window_tip", "La finestra corrente del desktop remoto richiede privilegi più elevati per funzionare, quindi non è in grado di utilizzare temporaneamente il mouse e la tastiera. È possibile chiedere all'utente remoto di ridurre a icona la finestra corrente o di fare clic sul pulsante di elevazione nella finestra di gestione della connessione. Per evitare questo problema, si consiglia di installare il software sul dispositivo remoto."),
|
||||
("Disconnected", "Disconnesso"),
|
||||
("Other", "Altro"),
|
||||
("Confirm before closing multiple tabs", "Conferma prima di chiudere più schede"),
|
||||
@ -387,13 +387,13 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Continue with", "Continua con"),
|
||||
("Elevate", "Eleva"),
|
||||
("Zoom cursor", "Cursore zoom"),
|
||||
("Accept sessions via password", ""),
|
||||
("Accept sessions via click", ""),
|
||||
("Accept sessions via both", ""),
|
||||
("Please wait for the remote side to accept your session request...", ""),
|
||||
("One-time Password", ""),
|
||||
("Use one-time password", ""),
|
||||
("One-time password length", ""),
|
||||
("Accept sessions via password", "Accetta sessioni via password"),
|
||||
("Accept sessions via click", "Accetta sessioni via click"),
|
||||
("Accept sessions via both", "Accetta sessioni con entrambi"),
|
||||
("Please wait for the remote side to accept your session request...", "Attendere che il lato remoto accetti la richiesta di sessione..."),
|
||||
("One-time Password", "Password monouso"),
|
||||
("Use one-time password", "Usa password monouso"),
|
||||
("One-time password length", "Lunghezza password monouso"),
|
||||
("Request access to your device", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user