git-svn-id: https://spexeah.com:8443/svn/Asuro@621 6dbc8c32-bb84-406f-8558-d1cf31a0ab0c

This commit is contained in:
kieron committed 2018-05-01 00:22:37 +00:00
1 parent 21545f3e18
commit 440417547f
77 files changed
+207 -6

No files matched your search

+158 -4
View File
File diff suppressed because it is too large. Load diff
+43
View File
@@ -53,6 +53,10 @@ var
Packet : uint32;
Registered : Boolean = false;
NeedsRedraw : Boolean = false;
RMouseDownPos : TMousePos;
LMouseDownPos : TMousePos;
LMouseDown : Boolean;
RMouseDown : Boolean;
procedure DrawCursor;
var
@@ -142,6 +146,9 @@ begin
f:= Mouse_Byte[0];
Packet.x_sign:= (f AND %00010000) = %00010000;
Packet.y_sign:= (f AND %00100000) = %00100000;
Packet.MMB_Down:= (f AND %00000100) = %00000100;
Packet.RMB_Down:= (f AND %00000010) = %00000010;
Packet.LMB_Down:= (f AND %00000001) = %00000001;
Packet.x_overflow:= (f AND $40) = $40;
Packet.y_overflow:= (f AND $80) = $80;
Packet.x_movement:= Mouse_Byte[1] - ((f SHL 4) AND $100);
@@ -155,6 +162,42 @@ begin
if Current.y > 1015 then Current.y:= 1015;
end;
Cycle:= 0;
if Packet.LMB_Down then begin
if not LMouseDown then begin
LMouseDown:= true;
LMouseDownPos.x:= Current.x;
LMouseDownPos.y:= Current.y;
//MouseDownEvent
console._mouseDown();
end;
end;
if not Packet.LMB_Down then begin
if LMouseDown then begin
If (Current.x = LMouseDownPos.x) and (Current.y = LMouseDownPos.y) then begin
Console._MouseClick(true);
end;
//MouseUpEvent
Console._MouseUp();
LMouseDown:= false;
end;
end;
if Packet.RMB_Down then begin
if not RMouseDown then begin
RMouseDown:= true;
RMouseDownPos.x:= Current.x;
RMouseDownPos.y:= Current.y;
end;
end;
if not Packet.RMB_Down then begin
if RMouseDown then begin
if (Current.x = RMouseDownPos.x) and (Current.y = RMouseDownPos.y) then begin
Console._MouseClick(false);
end;
end;
RMouseDown:= false;
end;
console.setMousePosition(Current.x, Current.y);
end;
end;
+2 -2
View File
@@ -3,11 +3,11 @@ unit asuro;
interface
const
VERSION = '1.0.0-610a';
VERSION = '1.0.0-613a';
VERSION_MAJOR = '1';
VERSION_MINOR = '0';
VERSION_SUB = '0';
REVISION = '610';
REVISION = '613';
RELEASE = 'a';
implementation
+4
View File
@@ -46,6 +46,7 @@ uses
fonts,
RTC,
serial,
shell,
memview;
procedure kmain(mbinfo: Pmultiboot_info_t; mbmagic: uint32); stdcall;
@@ -212,8 +213,11 @@ begin
tracer.pop_trace;
{ Init Progs }
shell.init();
memview.init();
console.writehexln(uint32(multibootinfo^.framebuffer_addr));
tracer.push_trace('kmain.KEYHOOK');
keyboard.hook(@temphook);
tracer.pop_trace;