Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
457 | trolly | 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 | |||
9 | ; |
||
10 | ; Call of videomode driver's functions |
||
11 | ; |
||
12 | ; (Add in System function 21 (and/or 26) as a subfunction 13) |
||
13 | ; |
||
14 | ; Author: Trans |
||
15 | ; Date: 19.07.2003 |
||
16 | ; |
||
17 | ; Include in MeOS kernel and compile with FASM |
||
18 | ; |
||
19 | |||
20 | uglobal |
||
21 | old_screen_width dd ? |
||
22 | old_screen_height dd ? |
||
23 | endg |
||
24 | |||
25 | cmp eax,13 ; CALL VIDEOMODE DRIVER FUNCTIONS |
||
26 | jne .no_vmode_drv_access |
||
27 | pushd [ScreenWidth] [ScreenHeight] |
||
28 | popd [old_screen_height] [old_screen_width] |
||
29 | or eax,-1 ; If driver is absent then eax does not change |
||
30 | call 0x760100 ; Entry point of video driver |
||
31 | mov [esp+36],eax |
||
32 | mov [esp+24],ebx |
||
33 | mov [esp+32],ecx |
||
34 | ; mov [esp+28],edx |
||
35 | mov eax,[old_screen_width] |
||
36 | mov ebx,[old_screen_height] |
||
37 | sub eax,[ScreenWidth] |
||
38 | jnz @f |
||
39 | sub ebx,[ScreenHeight] |
||
40 | jz .resolution_wasnt_changed |
||
41 | jmp .lp1 |
||
42 | @@: sub ebx,[ScreenHeight] |
||
43 | .lp1: sub [screen_workarea.right],eax |
||
44 | sub [screen_workarea.bottom],ebx |
||
45 | |||
46 | call repos_windows |
||
47 | mov eax, 0 |
||
48 | mov ebx, 0 |
||
49 | mov ecx, [ScreenWidth] |
||
50 | mov edx, [ScreenHeight] |
||
51 | call calculatescreen |
||
52 | |||
53 | .resolution_wasnt_changed: |
||
54 | ret |
||
55 | .no_vmode_drv_access: |