Rev 1161 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1159 | hidnplayr | 1 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
2 | ;; ;; |
||
3 | ;; Copyright (C) KolibriOS team 2004-2007. All rights reserved. ;; |
||
4 | ;; Distributed under terms of the GNU General Public License ;; |
||
5 | ;; ;; |
||
6 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
||
7 | |||
1206 | hidnplayr | 8 | $Revision: 1206 $ |
1159 | hidnplayr | 9 | |
10 | |||
11 | ; |
||
12 | ; Call of videomode driver's functions |
||
13 | ; |
||
14 | ; (Add in System function 21 (and/or 26) as a subfunction 13) |
||
15 | ; |
||
16 | ; Author: Trans |
||
17 | ; Date: 19.07.2003 |
||
18 | ; |
||
19 | ; Include in MeOS kernel and compile with FASM |
||
20 | ; |
||
21 | |||
22 | uglobal |
||
23 | old_screen_width dd ? |
||
24 | old_screen_height dd ? |
||
25 | endg |
||
26 | |||
27 | cmp eax,13 ; CALL VIDEOMODE DRIVER FUNCTIONS |
||
28 | jne .no_vmode_drv_access |
||
29 | pushd [Screen_Max_X] [Screen_Max_Y] |
||
30 | popd [old_screen_height] [old_screen_width] |
||
31 | or eax,-1 ; If driver is absent then eax does not change |
||
32 | call (VMODE_BASE+0x100) ; Entry point of video driver |
||
33 | mov [esp+36],eax |
||
34 | mov [esp+24],ebx |
||
35 | mov [esp+32],ecx |
||
36 | ; mov [esp+28],edx |
||
37 | mov eax,[old_screen_width] |
||
38 | mov ebx,[old_screen_height] |
||
39 | sub eax,[Screen_Max_X] |
||
40 | jnz @f |
||
41 | sub ebx,[Screen_Max_Y] |
||
42 | jz .resolution_wasnt_changed |
||
43 | jmp .lp1 |
||
44 | @@: sub ebx,[Screen_Max_Y] |
||
45 | .lp1: sub [screen_workarea.right],eax |
||
46 | sub [screen_workarea.bottom],ebx |
||
47 | |||
48 | call repos_windows |
||
49 | mov eax, 0 |
||
50 | mov ebx, 0 |
||
51 | mov ecx, [Screen_Max_X] |
||
52 | mov edx, [Screen_Max_Y] |
||
53 | call calculatescreen |
||
54 | |||
55 | .resolution_wasnt_changed: |
||
56 | ret |
||
57 | .no_vmode_drv_access: |