mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
console should work on android now
This commit is contained in:
parent
bdf7a88999
commit
6bc20a0a02
1 changed files with 7 additions and 4 deletions
|
|
@ -57,8 +57,9 @@ class ConsoleAPI{
|
|||
if(defined("NO_THREADS")){
|
||||
return;
|
||||
}
|
||||
if($this->loop->line !== false){
|
||||
$line = preg_replace("#\\x1b\\x5b([^\\x1b]*\\x7e|[\\x40-\\x50])#", "", trim($this->loop->line));
|
||||
$line = $this->loop->line;
|
||||
if($line !== false){
|
||||
$line = preg_replace("#\\x1b\\x5b([^\\x1b]*\\x7e|[\\x40-\\x50])#", "", trim($line));
|
||||
$this->loop->line = false;
|
||||
$output = $this->run($line, "console");
|
||||
if($output != ""){
|
||||
|
|
@ -290,8 +291,10 @@ class ConsoleLoop extends Thread{
|
|||
}
|
||||
|
||||
while(!$this->stop){
|
||||
$this->line = $this->readLine();
|
||||
$this->wait();
|
||||
$this->synchronized(function($t){
|
||||
$t->line = $t->readLine();
|
||||
$t->wait();
|
||||
}, $this);
|
||||
$this->line = false;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue