2007-03-26 14:18:08 +02:00
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
;; ;;
|
|
|
|
;; Copyright (C) KolibriOS team 2004-2007. All rights reserved. ;;
|
|
|
|
;; Distributed under terms of the GNU General Public License ;;
|
|
|
|
;; ;;
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
|
2007-07-27 15:52:03 +02:00
|
|
|
$Revision$
|
|
|
|
|
|
|
|
|
2005-10-06 19:56:22 +02: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 11:41:47 +01:00
|
|
|
|
|
|
|
uglobal
|
|
|
|
old_screen_width dd ?
|
|
|
|
old_screen_height dd ?
|
|
|
|
endg
|
|
|
|
|
2009-11-20 03:36:08 +01:00
|
|
|
; cmp eax,13 ; CALL VIDEOMODE DRIVER FUNCTIONS
|
|
|
|
dec ebx
|
|
|
|
jnz .no_vmode_drv_access
|
2008-02-22 13:38:59 +01:00
|
|
|
pushd [Screen_Max_X] [Screen_Max_Y]
|
2006-02-18 11:41:47 +01:00
|
|
|
popd [old_screen_height] [old_screen_width]
|
2005-10-06 19:56:22 +02:00
|
|
|
or eax,-1 ; If driver is absent then eax does not change
|
2007-04-28 14:45:22 +02:00
|
|
|
call (VMODE_BASE+0x100) ; Entry point of video driver
|
2009-11-20 03:36:08 +01:00
|
|
|
mov [esp+36-4],eax
|
|
|
|
mov [esp+24-4],ebx
|
|
|
|
mov [esp+32-4],ecx
|
2005-10-06 19:56:22 +02:00
|
|
|
; mov [esp+28],edx
|
2006-02-18 11:41:47 +01:00
|
|
|
mov eax,[old_screen_width]
|
|
|
|
mov ebx,[old_screen_height]
|
2008-02-22 13:38:59 +01:00
|
|
|
sub eax,[Screen_Max_X]
|
2006-02-18 11:41:47 +01:00
|
|
|
jnz @f
|
2008-02-22 13:38:59 +01:00
|
|
|
sub ebx,[Screen_Max_Y]
|
2006-02-18 11:41:47 +01:00
|
|
|
jz .resolution_wasnt_changed
|
|
|
|
jmp .lp1
|
2008-02-22 13:38:59 +01:00
|
|
|
@@: sub ebx,[Screen_Max_Y]
|
2006-02-18 11:41:47 +01:00
|
|
|
.lp1: sub [screen_workarea.right],eax
|
|
|
|
sub [screen_workarea.bottom],ebx
|
|
|
|
|
|
|
|
call repos_windows
|
2009-11-20 03:36:08 +01:00
|
|
|
xor eax,eax
|
|
|
|
xor ebx,ebx
|
2008-02-22 13:38:59 +01:00
|
|
|
mov ecx, [Screen_Max_X]
|
|
|
|
mov edx, [Screen_Max_Y]
|
2006-02-18 11:41:47 +01:00
|
|
|
call calculatescreen
|
|
|
|
|
|
|
|
.resolution_wasnt_changed:
|
2005-10-06 19:56:22 +02:00
|
|
|
ret
|
|
|
|
.no_vmode_drv_access:
|