--- deliantra/Deliantra-Client/DC/Main.pm 2012/11/21 12:48:12 1.26 +++ deliantra/Deliantra-Client/DC/Main.pm 2018/11/19 00:56:08 1.31 @@ -76,6 +76,8 @@ use DC::MapWidget; use DC::Macro; +# printf "%5d %5d %5d %5d\n", $_, DC::minpot $_, DC::ld32 $_, 2 << ((DC::ld32 $_ - 1)); + $SIG{QUIT} = sub { Carp::cluck "QUIT" }; $SIG{PIPE} = 'IGNORE'; @@ -513,7 +515,7 @@ sub audio_init { if ($CFG->{audio_enable}) { - DC::Audio::init $CFG->{audio_driver}; + DC::Audio::init; if ($SDL_MIXER) { audio_music_finished; @@ -1180,7 +1182,7 @@ state => $CFG->{texture_compression}, tooltip => "Use texture compression. Normally this will not reduce visual quality noticable but " . "will save a lot of memory and increase performance (and also fall prey to the ever-buggy Mac OS X software renderer). " - . "The compression algorithm can differ form card to card, so your mileage may vary. This setting is ignored in " + . "The compression algorithm can differ from card to card, so your mileage may vary. This setting is ignored in " . "forced OpenGL 1.1 mode and when using the Apple renderer.", on_changed => sub { my ($self, $value) = @_; $CFG->{texture_compression} = $value; 0 } ); @@ -1542,7 +1544,7 @@ if ($DELIANTRA_DEBUG & 16) { $BW_WATCHER = EV::periodic 0, 1, 0, sub { return unless $CONN; - debug sprintf "%8.2gKB/s", $CONN->{octets_in} / 1e3; + debug sprintf "%8.2gkB/s", $CONN->{octets_in} / 1e3; $CONN->{octets_in} = 0; }; } else { @@ -1957,7 +1959,7 @@ $vbox->add (new DC::UI::FancyFrame label => "Server Message", - tooltip => "The last message, or error, form the server.", + tooltip => "The last message, or error, from the server.", child => ($LOGIN_ERROR = new DC::UI::Label valign => 0, ellipsise => 0), ); @@ -2030,7 +2032,7 @@ text => $CFG->{output_rate}, tooltip => "The maximum bandwidth in bytes per second that the server should not exceed " . "when sending data. When 0 or unset, the server " - . "default will be used, which is usually around 100kb/s. Most servers will " + . "default will be used, which is usually around 100kB/s. Most servers will " . "dynamically find an optimal rate, so adjust this only when necessary.", on_changed => sub { $CFG->{output_rate} = $_[1]; 1 }, ); @@ -2606,7 +2608,7 @@ if ($CONN) { open_quit_dialog; } else { - EV::unloop EV::UNLOOP_ALL; + EV::break EV::BREAK_ALL; } }], ]); @@ -2987,7 +2989,7 @@ $SDL_CB[DC::SDL_QUIT] = sub { crash "SDL_QUIT"; - EV::unloop EV::UNLOOP_ALL; + EV::break EV::BREAK_ALL; }; $SDL_CB[DC::SDL_VIDEORESIZE] = sub { }; $SDL_CB[DC::SDL_VIDEOEXPOSE] = sub { @@ -3030,7 +3032,7 @@ ############################################################################# $SIG{INT} = $SIG{TERM} = sub { - EV::unloop; + EV::break; #d# TODO calling exit here hangs the process in some futex }; @@ -3157,7 +3159,7 @@ debug_toggle 0; delete $SIG{__DIE__}; - EV::loop; + EV::run; DC::save_cfg if $CFG->{config_autosave};