Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
btwise
OpenCorePKG_MOD
提交
446ce70f
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,发现更多精彩内容 >>
提交
446ce70f
编写于
3月 07, 2021
作者:
M
Marvin Häuser
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
OpenCanopy: Prevent cut-off entries entirely
上级
5079a142
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
62 addition
and
21 deletion
+62
-21
Changelog.md
Changelog.md
+1
-0
Platform/OpenCanopy/GuiApp.h
Platform/OpenCanopy/GuiApp.h
+5
-0
Platform/OpenCanopy/OcBootstrap.c
Platform/OpenCanopy/OcBootstrap.c
+2
-0
Platform/OpenCanopy/Views/BootPicker.c
Platform/OpenCanopy/Views/BootPicker.c
+54
-21
未找到文件。
Changelog.md
浏览文件 @
446ce70f
...
@@ -12,6 +12,7 @@ OpenCore Changelog
...
@@ -12,6 +12,7 @@ OpenCore Changelog
-
Fixed creating log file when root file system is not writable
-
Fixed creating log file when root file system is not writable
-
Fixed
`DisableSingleUser`
not being enabled in certain cases
-
Fixed
`DisableSingleUser`
not being enabled in certain cases
-
Added
`ForceBooterSignature`
quirk for Mac EFI firmware
-
Added
`ForceBooterSignature`
quirk for Mac EFI firmware
-
Fixed OpenCanopy sometimes cutting off shown boot entries
#### v0.6.7
#### v0.6.7
-
Fixed ocvalidate return code to be non-zero when issues are found
-
Fixed ocvalidate return code to be non-zero when issues are found
...
...
Platform/OpenCanopy/GuiApp.h
浏览文件 @
446ce70f
...
@@ -103,6 +103,11 @@ BootPickerViewInitialize (
...
@@ -103,6 +103,11 @@ BootPickerViewInitialize (
IN
GUI_CURSOR_GET_IMAGE
GetCursorImage
IN
GUI_CURSOR_GET_IMAGE
GetCursorImage
);
);
VOID
BootPickerViewLateInitialize
(
VOID
);
EFI_STATUS
EFI_STATUS
BootPickerEntriesAdd
(
BootPickerEntriesAdd
(
IN
OC_PICKER_CONTEXT
*
Context
,
IN
OC_PICKER_CONTEXT
*
Context
,
...
...
Platform/OpenCanopy/OcBootstrap.c
浏览文件 @
446ce70f
...
@@ -130,6 +130,8 @@ OcShowMenuByOc (
...
@@ -130,6 +130,8 @@ OcShowMenuByOc (
}
}
}
}
BootPickerViewLateInitialize
();
GuiRedrawAndFlushScreen
(
&
mDrawContext
);
GuiRedrawAndFlushScreen
(
&
mDrawContext
);
if
(
BootContext
->
PickerContext
->
PickerAudioAssist
)
{
if
(
BootContext
->
PickerContext
->
PickerAudioAssist
)
{
...
...
Platform/OpenCanopy/Views/BootPicker.c
浏览文件 @
446ce70f
...
@@ -272,30 +272,20 @@ InternalBootPickerSelectEntry (
...
@@ -272,30 +272,20 @@ InternalBootPickerSelectEntry (
INT64
INT64
InternelBootPickerScrollSelected
(
InternelBootPickerScrollSelected
(
IN
UINT32
Scale
VOID
)
)
{
{
CONST
GUI_VOLUME_ENTRY
*
SelectedEntry
;
CONST
GUI_VOLUME_ENTRY
*
SelectedEntry
;
INT64
EntryOffsetX
;
INT64
EntryOffsetX
;
ASSERT
(
mBootPicker
.
SelectedEntry
!=
NULL
);
if
(
mBootPicker
.
SelectedEntry
==
NULL
)
{
return
0
;
}
//
//
// If the selected entry is outside of the view, scroll it accordingly.
// If the selected entry is outside of the view, scroll it accordingly.
// This function is called every time an entry is added or changed by the
// user. Due to this internal design, the selected entry can never be outside
// of the view by more than one entry's size.
//
//
SelectedEntry
=
mBootPicker
.
SelectedEntry
;
SelectedEntry
=
mBootPicker
.
SelectedEntry
;
EntryOffsetX
=
mBootPicker
.
Hdr
.
Obj
.
OffsetX
+
SelectedEntry
->
Hdr
.
Obj
.
OffsetX
;
EntryOffsetX
=
mBootPicker
.
Hdr
.
Obj
.
OffsetX
+
SelectedEntry
->
Hdr
.
Obj
.
OffsetX
;
//
// If the selected element is off-screen, scroll the view such that it is at
// the very edge of the view. As the view's width bounds precisely a set of
// boot entries (i.e. there can never be a partial entry or extra padding),
// this is equivalent to scrolling one boot entry spot.
// This is done to achieve the correct offset during initialisation as the
// entries may be at "half-steps" due to centering.
//
ASSERT
((
mBootPickerContainer
.
Obj
.
Width
+
BOOT_ENTRY_SPACE
*
Scale
)
%
((
BOOT_ENTRY_WIDTH
+
BOOT_ENTRY_SPACE
)
*
Scale
)
==
0
);
if
(
EntryOffsetX
<
0
)
{
if
(
EntryOffsetX
<
0
)
{
return
-
EntryOffsetX
;
return
-
EntryOffsetX
;
...
@@ -385,7 +375,7 @@ InternalBootPickerChangeEntry (
...
@@ -385,7 +375,7 @@ InternalBootPickerChangeEntry (
PrevEntry
=
This
->
SelectedEntry
;
PrevEntry
=
This
->
SelectedEntry
;
InternalBootPickerSelectEntry
(
This
,
DrawContext
,
NewEntry
);
InternalBootPickerSelectEntry
(
This
,
DrawContext
,
NewEntry
);
ScrollOffset
=
InternelBootPickerScrollSelected
(
DrawContext
->
Scale
);
ScrollOffset
=
InternelBootPickerScrollSelected
();
if
(
ScrollOffset
==
0
)
{
if
(
ScrollOffset
==
0
)
{
//
//
// To redraw the entry *and* the selector, draw the entire height of the
// To redraw the entry *and* the selector, draw the entire height of the
...
@@ -1233,7 +1223,6 @@ BootPickerEntriesAdd (
...
@@ -1233,7 +1223,6 @@ BootPickerEntriesAdd (
BOOLEAN
UseDiskLabel
;
BOOLEAN
UseDiskLabel
;
BOOLEAN
UseGenericLabel
;
BOOLEAN
UseGenericLabel
;
BOOLEAN
Result
;
BOOLEAN
Result
;
INT64
ScrollOffset
;
ASSERT
(
GuiContext
!=
NULL
);
ASSERT
(
GuiContext
!=
NULL
);
ASSERT
(
Entry
!=
NULL
);
ASSERT
(
Entry
!=
NULL
);
...
@@ -1447,11 +1436,6 @@ BootPickerEntriesAdd (
...
@@ -1447,11 +1436,6 @@ BootPickerEntriesAdd (
GuiContext
->
BootEntry
=
Entry
;
GuiContext
->
BootEntry
=
Entry
;
}
}
if
(
mBootPicker
.
SelectedEntry
!=
NULL
)
{
ScrollOffset
=
InternelBootPickerScrollSelected
(
GuiContext
->
Scale
);
mBootPicker
.
Hdr
.
Obj
.
OffsetX
+=
ScrollOffset
;
}
return
EFI_SUCCESS
;
return
EFI_SUCCESS
;
}
}
...
@@ -1704,6 +1688,55 @@ BootPickerViewInitialize (
...
@@ -1704,6 +1688,55 @@ BootPickerViewInitialize (
return
EFI_SUCCESS
;
return
EFI_SUCCESS
;
}
}
VOID
BootPickerViewLateInitialize
(
VOID
)
{
INT64
ScrollOffset
;
CONST
LIST_ENTRY
*
ListEntry
;
CONST
GUI_VOLUME_ENTRY
*
BootEntry
;
INT64
FirstPosOffset
;
ASSERT
(
mBootPicker
.
SelectedEntry
!=
NULL
);
ScrollOffset
=
InternelBootPickerScrollSelected
();
//
// If ScrollOffset is non-0, the selected entry will be aligned left- or
// right-most. The view holds a discrete amount of entries, so cut-offs are
// impossible.
//
if
(
ScrollOffset
==
0
)
{
ListEntry
=
mBootPicker
.
Hdr
.
Obj
.
Children
.
BackLink
;
ASSERT
(
ListEntry
==
&
mBootPickerSelector
.
Hdr
.
Link
);
FirstPosOffset
=
0
;
//
// Last entry is always the selector.
//
ListEntry
=
ListEntry
->
BackLink
;
//
// Find the first entry that is fully visible.
//
while
(
!
IsNull
(
&
mBootPicker
.
Hdr
.
Obj
.
Children
,
ListEntry
))
{
BootEntry
=
BASE_CR
(
ListEntry
,
GUI_VOLUME_ENTRY
,
Hdr
.
Link
);
if
(
mBootPicker
.
Hdr
.
Obj
.
OffsetX
+
BootEntry
->
Hdr
.
Obj
.
OffsetX
<
0
)
{
break
;
}
FirstPosOffset
=
mBootPicker
.
Hdr
.
Obj
.
OffsetX
+
BootEntry
->
Hdr
.
Obj
.
OffsetX
;
ListEntry
=
ListEntry
->
BackLink
;
}
//
// Move the first fully visible boot entry to the very left to prevent
// cut-off entries.
//
ScrollOffset
=
-
(
INT64
)
FirstPosOffset
;
}
mBootPicker
.
Hdr
.
Obj
.
OffsetX
+=
ScrollOffset
;
}
VOID
VOID
BootPickerViewDeinitialize
(
BootPickerViewDeinitialize
(
IN
OUT
GUI_DRAWING_CONTEXT
*
DrawContext
,
IN
OUT
GUI_DRAWING_CONTEXT
*
DrawContext
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录