PCIDEV - checking for "rolled up" window

git-svn-id: svn://kolibrios.org@2057 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Marat Zakiyanov (Mario79) 2011-08-18 14:08:40 +00:00
parent 393ef14fe3
commit a1a467c8ef
2 changed files with 25 additions and 5 deletions

View File

@ -65,7 +65,7 @@ still:
jmp still jmp still
;----------------------------------------------------------------------------- ;-----------------------------------------------------------------------------
red: ; redraw red: ; redraw
mcall 9, Proc_Info, -1 ; window redraw requested so get new window coordinates and size call get_window_param
mov eax, [Proc_Info.box.left]; store the window coordinates into the Form Structure mov eax, [Proc_Info.box.left]; store the window coordinates into the Form Structure
mov [Form + 2], ax ; x start position mov [Form + 2], ax ; x start position
mov eax, [Proc_Info.box.top]; mov eax, [Proc_Info.box.top];
@ -167,6 +167,11 @@ prepare_text_area:
xor edi,edi xor edi,edi
ret ret
;-----------------------------------------------------------------------------
get_window_param:
mcall 9, Proc_Info, -1 ; window redraw requested so get
; new window coordinates and size
ret
;----------------------------------------------------------------------------- ;-----------------------------------------------------------------------------
draw_window: draw_window:
call prepare_text_area call prepare_text_area
@ -175,6 +180,13 @@ draw_window:
mcall 12, 1 ; start of draw mcall 12, 1 ; start of draw
; DRAW WINDOW ; DRAW WINDOW
mcall 0,dword [Form],dword [Form + 4],0x13ffffff,0x805080d0,title mcall 0,dword [Form],dword [Form + 4],0x13ffffff,0x805080d0,title
call get_window_param
mov eax,[Proc_Info+70] ;status of window
test eax,100b
jne .end
mcall 8,<450,100>,<25,25>,2,0xC0C0C0 mcall 8,<450,100>,<25,25>,2,0xC0C0C0
shr ecx,16 shr ecx,16
mov bx,cx mov bx,cx
@ -190,18 +202,18 @@ draw_window:
sub bx, 32 ; bar is 32 pixels shorter then window width sub bx, 32 ; bar is 32 pixels shorter then window width
mov ecx, 119 * 65536 + 10 ; set Ystart(109) and Height(10) of bar 109 mov ecx, 119 * 65536 + 10 ; set Ystart(109) and Height(10) of bar 109
mov edx, 0xC0C0C0 ; set color of bar mov edx, 0xC0C0C0 ; set color of bar
again: ;begin draw bar loop .again: ;begin draw bar loop
mcall ; draw bar to window area mcall ; draw bar to window area
shr ecx, 16 ; move the Ystart position to working area shr ecx, 16 ; move the Ystart position to working area
add ecx, 34 ; add 34 pixels to Y Start (moves bar down) add ecx, 34 ; add 34 pixels to Y Start (moves bar down)
cmp cx, word [Form + 4] ; is the Ystart position outside of window area cmp cx, word [Form + 4] ; is the Ystart position outside of window area
jae nomo ; if so stop drawing bars jae .nomo ; if so stop drawing bars
sub ecx, 14 ; if not, we only need 20 pixels between bar tops sub ecx, 14 ; if not, we only need 20 pixels between bar tops
shl ecx, 16 ; set that values as Ystart shl ecx, 16 ; set that values as Ystart
add ecx, 10 ; Bar Height is always 10 pixels add ecx, 10 ; Bar Height is always 10 pixels
jmp again ; draw another bar jmp .again ; draw another bar
;----------------------------------------------------------------------------- ;-----------------------------------------------------------------------------
nomo: ;done drawing bars here .nomo: ;done drawing bars here
; start PCI stuff ; start PCI stuff
call Get_PCI_Info ; get pci version and last bus, scan for and draw each pci device call Get_PCI_Info ; get pci version and last bus, scan for and draw each pci device
@ -252,6 +264,7 @@ nomo: ;done drawing bars here
jo @f jo @f
call Try_MMIO call Try_MMIO
@@: @@:
.end:
mcall 12, 2 ; end of draw mcall 12, 2 ; end of draw
ret ret
;----------------------------------------------------------------------------- ;-----------------------------------------------------------------------------

View File

@ -10,6 +10,13 @@ to-do:
Full device detection (like "ATI Radeon 9200") will increase app Full device detection (like "ATI Radeon 9200") will increase app
size a lot and probably it is function of particular drivers size a lot and probably it is function of particular drivers
;----------------------------------------------------------------------------- ;-----------------------------------------------------------------------------
2.3: PCIDEV 18/08/2011
Author: Marat Zakiyanov aka Mario79 <mario79@bk.ru>
Features:
fixed
* Checking for "rolled up" window
;-----------------------------------------------------------------------------
2.3: PCIDEV 02/07/2011 2.3: PCIDEV 02/07/2011
Author: Marat Zakiyanov aka Mario79 <mario79@bk.ru> Author: Marat Zakiyanov aka Mario79 <mario79@bk.ru>
Features: Features: