mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-25 07:34:03 -06:00
Merge branch 'sender' into sender-dlp
This commit is contained in:
commit
870cb3ccc4
1 changed files with 7 additions and 3 deletions
|
@ -325,9 +325,13 @@ sub scan_serial_ports {
|
||||||
# Windows
|
# Windows
|
||||||
if (eval "use Win32::TieRegistry; 1") {
|
if (eval "use Win32::TieRegistry; 1") {
|
||||||
my $ts = Win32::TieRegistry->new("HKEY_LOCAL_MACHINE\\HARDWARE\\DEVICEMAP\\SERIALCOMM",
|
my $ts = Win32::TieRegistry->new("HKEY_LOCAL_MACHINE\\HARDWARE\\DEVICEMAP\\SERIALCOMM",
|
||||||
{ Access => Win32::TieRegistry::KEY_READ() });
|
{ Access => 'KEY_READ' });
|
||||||
$ts->Tie(\my %reg);
|
if ($ts) {
|
||||||
push @ports, sort values %reg;
|
# when no serial ports are available, the registry key doesn't exist and
|
||||||
|
# TieRegistry->new returns undef
|
||||||
|
$ts->Tie(\my %reg);
|
||||||
|
push @ports, sort values %reg;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
# UNIX and OS X
|
# UNIX and OS X
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue