mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-22 20:49: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")){
|
if(defined("NO_THREADS")){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if($this->loop->line !== false){
|
$line = $this->loop->line;
|
||||||
$line = preg_replace("#\\x1b\\x5b([^\\x1b]*\\x7e|[\\x40-\\x50])#", "", trim($this->loop->line));
|
if($line !== false){
|
||||||
|
$line = preg_replace("#\\x1b\\x5b([^\\x1b]*\\x7e|[\\x40-\\x50])#", "", trim($line));
|
||||||
$this->loop->line = false;
|
$this->loop->line = false;
|
||||||
$output = $this->run($line, "console");
|
$output = $this->run($line, "console");
|
||||||
if($output != ""){
|
if($output != ""){
|
||||||
|
|
@ -290,8 +291,10 @@ class ConsoleLoop extends Thread{
|
||||||
}
|
}
|
||||||
|
|
||||||
while(!$this->stop){
|
while(!$this->stop){
|
||||||
$this->line = $this->readLine();
|
$this->synchronized(function($t){
|
||||||
$this->wait();
|
$t->line = $t->readLine();
|
||||||
|
$t->wait();
|
||||||
|
}, $this);
|
||||||
$this->line = false;
|
$this->line = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue