2007-03-26 16:18:08 +04:00
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
;; ;;
|
|
|
|
;; Copyright (C) KolibriOS team 2004-2007. All rights reserved. ;;
|
|
|
|
;; Distributed under terms of the GNU General Public License ;;
|
|
|
|
;; ;;
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
|
2007-07-27 17:52:03 +04:00
|
|
|
$Revision$
|
|
|
|
|
|
|
|
|
2005-10-06 21:56:22 +04:00
|
|
|
;
|
|
|
|
; Call of videomode driver's functions
|
|
|
|
;
|
|
|
|
; (Add in System function 21 (and/or 26) as a subfunction 13)
|
|
|
|
;
|
|
|
|
; Author: Trans
|
|
|
|
; Date: 19.07.2003
|
|
|
|
;
|
|
|
|
; Include in MeOS kernel and compile with FASM
|
|
|
|
;
|
2006-02-18 13:41:47 +03:00
|
|
|
|
|
|
|
uglobal
|
|
|
|
old_screen_width dd ?
|
|
|
|
old_screen_height dd ?
|
|
|
|
endg
|
|
|
|
|
2009-11-20 05:36:08 +03:00
|
|
|
; cmp eax,13 ; CALL VIDEOMODE DRIVER FUNCTIONS
|
|
|
|
dec ebx
|
|
|
|
jnz .no_vmode_drv_access
|
2008-02-22 15:38:59 +03:00
|
|
|
pushd [Screen_Max_X] [Screen_Max_Y]
|
2006-02-18 13:41:47 +03:00
|
|
|
popd [old_screen_height] [old_screen_width]
|
2005-10-06 21:56:22 +04:00
|
|
|
or eax,-1 ; If driver is absent then eax does not change
|
2007-04-28 16:45:22 +04:00
|
|
|
call (VMODE_BASE+0x100) ; Entry point of video driver
|
2009-11-20 05:36:08 +03:00
|
|
|
mov [esp+36-4],eax
|
|
|
|
mov [esp+24-4],ebx
|
|
|
|
mov [esp+32-4],ecx
|
2005-10-06 21:56:22 +04:00
|
|
|
; mov [esp+28],edx
|
2006-02-18 13:41:47 +03:00
|
|
|
mov eax,[old_screen_width]
|
|
|
|
mov ebx,[old_screen_height]
|
2008-02-22 15:38:59 +03:00
|
|
|
sub eax,[Screen_Max_X]
|
2006-02-18 13:41:47 +03:00
|
|
|
jnz @f
|
2008-02-22 15:38:59 +03:00
|
|
|
sub ebx,[Screen_Max_Y]
|
2006-02-18 13:41:47 +03:00
|
|
|
jz .resolution_wasnt_changed
|
|
|
|
jmp .lp1
|
2008-02-22 15:38:59 +03:00
|
|
|
@@: sub ebx,[Screen_Max_Y]
|
2006-02-18 13:41:47 +03:00
|
|
|
.lp1: sub [screen_workarea.right],eax
|
|
|
|
sub [screen_workarea.bottom],ebx
|
|
|
|
|
|
|
|
call repos_windows
|
2009-11-20 05:36:08 +03:00
|
|
|
xor eax,eax
|
|
|
|
xor ebx,ebx
|
2008-02-22 15:38:59 +03:00
|
|
|
mov ecx, [Screen_Max_X]
|
|
|
|
mov edx, [Screen_Max_Y]
|
2006-02-18 13:41:47 +03:00
|
|
|
call calculatescreen
|
|
|
|
|
|
|
|
.resolution_wasnt_changed:
|
2005-10-06 21:56:22 +04:00
|
|
|
ret
|
|
|
|
.no_vmode_drv_access:
|