mirror of
https://github.com/adamdruppe/arsd.git
synced 2025-04-26 21:30:12 +03:00
more catchup
This commit is contained in:
parent
1c943c529f
commit
4b0f2b31a8
3 changed files with 9 additions and 0 deletions
|
@ -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
1
gpio.d
|
@ -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");
|
||||||
|
|
|
@ -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,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue