Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
btwise
OpenCorePKG_MOD
提交
3fb1b692
O
OpenCorePKG_MOD
项目概览
btwise
/
OpenCorePKG_MOD
通知
26
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
OpenCorePKG_MOD
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
3fb1b692
编写于
3月 07, 2020
作者:
V
vit9696
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
BootLiquor: Match cursor behaviour with boot.efi
上级
41bd8bbd
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
69 addition
and
17 deletion
+69
-17
Changelog.md
Changelog.md
+1
-0
Platform/BootLiquor/Input/InputSimAbsPtr.c
Platform/BootLiquor/Input/InputSimAbsPtr.c
+67
-16
Platform/BootLiquor/Input/InputSimTextIn.c
Platform/BootLiquor/Input/InputSimTextIn.c
+1
-1
未找到文件。
Changelog.md
浏览文件 @
3fb1b692
...
@@ -4,6 +4,7 @@ OpenCore Changelog
...
@@ -4,6 +4,7 @@ OpenCore Changelog
#### v0.5.7
#### v0.5.7
-
Added TimeMachine detection to picker
-
Added TimeMachine detection to picker
-
Added early preview version of BootLiquor
-
Added early preview version of BootLiquor
-
Fixed FS discovery on NVMe with legacy drivers
#### v0.5.6
#### v0.5.6
-
Various improvements to builtin text renderer
-
Various improvements to builtin text renderer
...
...
Platform/BootLiquor/Input/InputSimAbsPtr.c
浏览文件 @
3fb1b692
...
@@ -15,8 +15,8 @@
...
@@ -15,8 +15,8 @@
#include <Library/OcGuardLib.h>
#include <Library/OcGuardLib.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Library/UefiBootServicesTableLib.h>
#include "BootLiquor.h"
#include "
../
BootLiquor.h"
#include "GuiIo.h"
#include "
../
GuiIo.h"
struct
GUI_POINTER_CONTEXT_
{
struct
GUI_POINTER_CONTEXT_
{
EFI_SIMPLE_POINTER_PROTOCOL
*
Pointer
;
EFI_SIMPLE_POINTER_PROTOCOL
*
Pointer
;
...
@@ -65,6 +65,28 @@ InternalClipPointerSimple (
...
@@ -65,6 +65,28 @@ InternalClipPointerSimple (
return
NewCoord
;
return
NewCoord
;
}
}
STATIC
INT64
InternalGetInterpolatedValue
(
IN
INT64
Value
)
{
INTN
Bit
;
STATIC
CONST
INT8
AccelerationNumbers
[]
=
{
1
,
2
,
3
,
4
,
5
,
6
};
if
(
Value
!=
0
)
{
Bit
=
HighBitSet64
(
ABS
(
Value
));
return
Value
*
AccelerationNumbers
[
Bit
>=
ARRAY_SIZE
(
AccelerationNumbers
)
-
1
?
ARRAY_SIZE
(
AccelerationNumbers
)
-
1
:
Bit
];
}
return
0
;
}
STATIC
STATIC
EFI_STATUS
EFI_STATUS
InternalUpdateStateSimple
(
InternalUpdateStateSimple
(
...
@@ -74,6 +96,8 @@ InternalUpdateStateSimple (
...
@@ -74,6 +96,8 @@ InternalUpdateStateSimple (
{
{
EFI_STATUS
Status
;
EFI_STATUS
Status
;
EFI_SIMPLE_POINTER_STATE
PointerState
;
EFI_SIMPLE_POINTER_STATE
PointerState
;
INT64
InterpolatedX
;
INT64
InterpolatedY
;
ASSERT
(
Context
!=
NULL
);
ASSERT
(
Context
!=
NULL
);
ASSERT
(
State
!=
NULL
);
ASSERT
(
State
!=
NULL
);
...
@@ -87,19 +111,46 @@ InternalUpdateStateSimple (
...
@@ -87,19 +111,46 @@ InternalUpdateStateSimple (
return
Status
;
return
Status
;
}
}
InterpolatedX
=
DivS64x64Remainder
(
InternalGetInterpolatedValue
(
PointerState
.
RelativeMovementX
),
Context
->
Pointer
->
Mode
->
ResolutionX
,
NULL
);
InterpolatedY
=
DivS64x64Remainder
(
InternalGetInterpolatedValue
(
PointerState
.
RelativeMovementY
),
Context
->
Pointer
->
Mode
->
ResolutionY
,
NULL
);
if
(
InterpolatedX
==
0
)
{
if
(
PointerState
.
RelativeMovementX
>
0
)
{
InterpolatedX
=
1
;
}
else
if
(
PointerState
.
RelativeMovementX
<
0
)
{
InterpolatedX
=
-
1
;
}
}
if
(
InterpolatedY
==
0
)
{
if
(
PointerState
.
RelativeMovementY
>
0
)
{
InterpolatedY
=
1
;
}
else
if
(
PointerState
.
RelativeMovementY
<
0
)
{
InterpolatedY
=
-
1
;
}
}
Context
->
SimpleX
=
InternalClipPointerSimple
(
Context
->
SimpleX
=
InternalClipPointerSimple
(
Context
->
SimpleX
,
Context
->
SimpleX
,
PointerState
.
RelativeMovement
X
,
(
INT32
)
Interpolated
X
,
Context
->
SimpleMaxX
Context
->
SimpleMaxX
);
);
State
->
X
=
(
UINT32
)
DivU64x32
(
Context
->
SimpleX
,
Context
->
Pointer
->
Mode
->
ResolutionX
)
;
State
->
X
=
(
UINT32
)
Context
->
SimpleX
;
Context
->
SimpleY
=
InternalClipPointerSimple
(
Context
->
SimpleY
=
InternalClipPointerSimple
(
Context
->
SimpleY
,
Context
->
SimpleY
,
PointerState
.
RelativeMovement
Y
,
(
INT32
)
Interpolated
Y
,
Context
->
SimpleMaxY
Context
->
SimpleMaxY
);
);
State
->
Y
=
(
UINT32
)
DivU64x32
(
Context
->
SimpleY
,
Context
->
Pointer
->
Mode
->
ResolutionY
)
;
State
->
Y
=
(
UINT32
)
Context
->
SimpleY
;
State
->
PrimaryDown
=
PointerState
.
LeftButton
;
State
->
PrimaryDown
=
PointerState
.
LeftButton
;
State
->
SecondaryDown
=
PointerState
.
RightButton
;
State
->
SecondaryDown
=
PointerState
.
RightButton
;
...
@@ -304,10 +355,10 @@ GuiPointerConstruct (
...
@@ -304,10 +355,10 @@ GuiPointerConstruct (
}
}
if
(
Context
.
Pointer
!=
NULL
)
{
if
(
Context
.
Pointer
!=
NULL
)
{
Context
.
SimpleX
=
DefaultX
*
Context
.
Pointer
->
Mode
->
ResolutionX
;
Context
.
SimpleX
=
DefaultX
;
Context
.
SimpleY
=
DefaultY
*
Context
.
Pointer
->
Mode
->
ResolutionY
;
Context
.
SimpleY
=
DefaultY
;
Context
.
SimpleMaxX
=
(
Width
-
1
)
*
Context
.
Pointer
->
Mode
->
ResolutionX
;
Context
.
SimpleMaxX
=
Width
-
1
;
Context
.
SimpleMaxY
=
(
Height
-
1
)
*
Context
.
Pointer
->
Mode
->
ResolutionY
;
Context
.
SimpleMaxY
=
Height
-
1
;
}
}
Context
.
Width
=
Width
;
Context
.
Width
=
Width
;
...
...
Platform/BootLiquor/Input/InputSimTextIn.c
浏览文件 @
3fb1b692
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
#include <Library/DebugLib.h>
#include <Library/DebugLib.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Library/UefiBootServicesTableLib.h>
#include "GuiIo.h"
#include "
../
GuiIo.h"
struct
GUI_KEY_CONTEXT_
{
struct
GUI_KEY_CONTEXT_
{
EFI_SIMPLE_TEXT_INPUT_PROTOCOL
TextIn
;
EFI_SIMPLE_TEXT_INPUT_PROTOCOL
TextIn
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录