more catchup

This commit is contained in:
Adam D. Ruppe 2021-06-08 15:03:50 -04:00
parent 1c943c529f
commit 4b0f2b31a8
3 changed files with 9 additions and 0 deletions

View file

@ -384,6 +384,12 @@ string toSql(Database db, Variant a) {
} else if(auto t = a.peek!(DateTime)) { } else if(auto t = a.peek!(DateTime)) {
// FIXME: this might be broken cuz of timezones! // FIXME: this might be broken cuz of timezones!
return db.sysTimeToValue(cast(SysTime) *t); return db.sysTimeToValue(cast(SysTime) *t);
} else if(auto t = a.peek!string) {
auto str = *t;
if(str is null)
return "NULL";
else
return '\'' ~ db.escape(str) ~ '\'';
} else { } else {
string str = to!string(a); string str = to!string(a);
return '\'' ~ db.escape(str) ~ '\''; return '\'' ~ db.escape(str) ~ '\'';

1
gpio.d
View file

@ -143,6 +143,7 @@ struct GpioChip {
} }
} }
version(gpio_demo)
void main() { void main() {
import std.stdio; import std.stdio;
GpioChip g = GpioChip("/dev/gpiochip0"); GpioChip g = GpioChip("/dev/gpiochip0");

View file

@ -8448,6 +8448,8 @@ version(TerminalDirectToEmulator) {
int termX = (ev.clientX - paddingLeft) / fontWidth; int termX = (ev.clientX - paddingLeft) / fontWidth;
int termY = (ev.clientY - paddingTop) / fontHeight; int termY = (ev.clientY - paddingTop) / fontHeight;
import std.stdio; writeln(ev.button);
if(sendMouseInputToApplication(termX, termY, if(sendMouseInputToApplication(termX, termY,
arsd.terminalemulator.MouseEventType.buttonReleased, arsd.terminalemulator.MouseEventType.buttonReleased,
cast(arsd.terminalemulator.MouseButton) ev.button, cast(arsd.terminalemulator.MouseButton) ev.button,