Fix input
This commit is contained in:
@@ -1873,7 +1873,7 @@ class InputCode : Code
|
|||||||
{
|
{
|
||||||
vm.petitcomputer.console.printString("?Redo from start \n");
|
vm.petitcomputer.console.printString("?Redo from start \n");
|
||||||
}
|
}
|
||||||
wstring input = vm.petitcomputer.input("", false);
|
wstring input = vm.petitcomputer.input("", false, true);
|
||||||
wstring[] split = input.split(",");
|
wstring[] split = input.split(",");
|
||||||
error = false;
|
error = false;
|
||||||
if(split.length == 0)
|
if(split.length == 0)
|
||||||
@@ -2558,6 +2558,6 @@ class Linput : Code
|
|||||||
{
|
{
|
||||||
Value guide;
|
Value guide;
|
||||||
vm.pop(guide);
|
vm.pop(guide);
|
||||||
vm.push(Value(vm.petitcomputer.input(guide.castDString, false)));
|
vm.push(Value(vm.petitcomputer.input(guide.castDString, false, true)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1113,7 +1113,7 @@ class PetitComputer
|
|||||||
{
|
{
|
||||||
printPrompt();
|
printPrompt();
|
||||||
}
|
}
|
||||||
auto prg = input("", true);
|
auto prg = input("", true, false);
|
||||||
if (!prg.empty && (inputHistory.length == 0 || inputHistory[inputHistory.length - 1] != prg))
|
if (!prg.empty && (inputHistory.length == 0 || inputHistory[inputHistory.length - 1] != prg))
|
||||||
{
|
{
|
||||||
inputHistory.put(prg);
|
inputHistory.put(prg);
|
||||||
@@ -1322,7 +1322,7 @@ class PetitComputer
|
|||||||
keybufferlen = 0;
|
keybufferlen = 0;
|
||||||
}
|
}
|
||||||
RingBuffer!wstring inputHistory = new RingBuffer!wstring(32/*ダイレクトモードでの履歴の数は32*/);
|
RingBuffer!wstring inputHistory = new RingBuffer!wstring(32/*ダイレクトモードでの履歴の数は32*/);
|
||||||
wstring input(wstring prompt, bool useClipBoard)
|
wstring input(wstring prompt, bool useClipBoard, bool isVM/*if this flag is true, enable start/select interrupt*/)
|
||||||
{
|
{
|
||||||
auto olddisplay = displaynum;
|
auto olddisplay = displaynum;
|
||||||
//displaynum = 0;
|
//displaynum = 0;
|
||||||
@@ -1383,10 +1383,10 @@ class PetitComputer
|
|||||||
console.CSRX = 0;
|
console.CSRX = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
while(!quit)
|
while(!quit && (!isVM || running))
|
||||||
{
|
{
|
||||||
auto oldpos = keybufferpos;
|
auto oldpos = keybufferpos;
|
||||||
while(oldpos == keybufferpos && !quit)
|
while(oldpos == keybufferpos && !quit && (!isVM || running))
|
||||||
{
|
{
|
||||||
Button old;
|
Button old;
|
||||||
synchronized(buttonLock)
|
synchronized(buttonLock)
|
||||||
|
|||||||
Reference in New Issue
Block a user