1
0

Implement XON/XOFF

This commit is contained in:
otya128
2016-12-09 18:24:33 +09:00
parent 0306a215b0
commit 463556954a
3 changed files with 60 additions and 0 deletions

View File

@@ -1236,6 +1236,37 @@ class PetitComputer
{
return page >= 0 && page < 6;
}
struct X
{
bool motion;
bool expad;
bool mic;
bool wiiU;
}
X x;
public void setX(wstring func, bool value)
{
if (func == "WIIU")
{
x.wiiU = value;
}
else if (func == "MIC")
{
x.mic = value;
}
else if (func == "EXPAD")
{
x.expad = value;
}
else if (func == "MOTION")
{
x.motion = value;
}
else
{
std.stdio.stderr.writefln("Unknown %s %s", value ? "XON" : "XOFF", func);
}
}
//プチコン内部表現はRGB5_A1
static uint toGLColor(GLenum format, ubyte r, ubyte g, ubyte b, ubyte a)
{