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