forked from KolibriOS/kolibrios
Fix kernel crash on high screen resolution.
Increase MAX_SCREEN_WIDTH=3840 and MAX_SCREEN_HEIGHT=2160. Replace hardcoded numbers with macros, add runtime checks. git-svn-id: svn://kolibrios.org@7522 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
babba2a8ce
commit
cf7de4af9c
@ -733,6 +733,9 @@ virtual at OS_BASE + BOOT_VARS
|
|||||||
BOOT boot_data
|
BOOT boot_data
|
||||||
end virtual
|
end virtual
|
||||||
|
|
||||||
|
MAX_SCREEN_WIDTH = 3840
|
||||||
|
MAX_SCREEN_HEIGHT = 2160
|
||||||
|
|
||||||
struct display_t
|
struct display_t
|
||||||
x dd ?
|
x dd ?
|
||||||
y dd ?
|
y dd ?
|
||||||
|
@ -341,8 +341,8 @@ fpu_data:
|
|||||||
fpu_data_size = $ - fpu_data
|
fpu_data_size = $ - fpu_data
|
||||||
draw_data:
|
draw_data:
|
||||||
rb 32*256
|
rb 32*256
|
||||||
BPSLine_calc_area rd 1440
|
BPSLine_calc_area rd MAX_SCREEN_HEIGHT
|
||||||
d_width_calc_area rd 1140
|
d_width_calc_area rd MAX_SCREEN_HEIGHT
|
||||||
mouseunder rd 16*24
|
mouseunder rd 16*24
|
||||||
|
|
||||||
mem_block_list rd 64*2
|
mem_block_list rd 64*2
|
||||||
|
@ -45,6 +45,8 @@ init_video:
|
|||||||
mov [_display.vrefresh], 60
|
mov [_display.vrefresh], 60
|
||||||
|
|
||||||
movzx eax, word [BOOT.x_res]; X max
|
movzx eax, word [BOOT.x_res]; X max
|
||||||
|
cmp eax, MAX_SCREEN_WIDTH
|
||||||
|
ja $
|
||||||
mov [_display.width], eax
|
mov [_display.width], eax
|
||||||
mov [ebp+FRB.width], eax
|
mov [ebp+FRB.width], eax
|
||||||
mov [display_width_standard], eax
|
mov [display_width_standard], eax
|
||||||
@ -52,6 +54,8 @@ init_video:
|
|||||||
mov [screen_workarea.right], eax
|
mov [screen_workarea.right], eax
|
||||||
|
|
||||||
movzx eax, word [BOOT.y_res]; Y max
|
movzx eax, word [BOOT.y_res]; Y max
|
||||||
|
cmp eax, MAX_SCREEN_HEIGHT
|
||||||
|
ja $
|
||||||
mov [_display.height], eax
|
mov [_display.height], eax
|
||||||
mov [ebp+FRB.height], eax
|
mov [ebp+FRB.height], eax
|
||||||
mov [display_height_standard], eax
|
mov [display_height_standard], eax
|
||||||
|
@ -21,8 +21,8 @@ $Revision$
|
|||||||
|
|
||||||
uglobal
|
uglobal
|
||||||
align 4
|
align 4
|
||||||
bgr_cur_line rd 1920 ; maximum width of screen
|
bgr_cur_line rd MAX_SCREEN_WIDTH
|
||||||
bgr_next_line rd 1920
|
bgr_next_line rd MAX_SCREEN_WIDTH
|
||||||
endg
|
endg
|
||||||
|
|
||||||
iglobal
|
iglobal
|
||||||
|
Loading…
Reference in New Issue
Block a user