diff options
author | nickysn <nickysn@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2013-10-05 17:48:05 +0000 |
---|---|---|
committer | nickysn <nickysn@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2013-10-05 17:48:05 +0000 |
commit | ed482b047d7cd09431892715d957f1f2ba165df2 (patch) | |
tree | 245d458a473deac6b6d3f1a5449e1ac66fac4a81 /packages/graph | |
parent | dbee407d2d14a2e44a3fdfadc0275e7362449f0b (diff) | |
download | fpc-ed482b047d7cd09431892715d957f1f2ba165df2.tar.gz |
* windows detection on startup rewritten to use intr
git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@25652 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'packages/graph')
-rw-r--r-- | packages/graph/src/msdos/graph.pp | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/packages/graph/src/msdos/graph.pp b/packages/graph/src/msdos/graph.pp index e2bf5b175d..90efaffae9 100644 --- a/packages/graph/src/msdos/graph.pp +++ b/packages/graph/src/msdos/graph.pp @@ -4536,6 +4536,8 @@ begin exitproc := go32exitsave; end; +var + regs: Registers; begin { must be done *before* initialize graph is called, because the save } { buffer can be used in the normal exit_proc (which is hooked in } @@ -4547,22 +4549,8 @@ begin { such a problem has exited), so detect its presense and do not } { use those functions if it's running. I'm really tired of } { working around Windows bugs :( (JM) } - asm - mov ax,$160a - push bp - push si - push di - push bx - int $2f - pop bx - pop di - pop si - pop bp - test ax,ax - jz @no_win - mov al, 1 -@no_win: - mov inWindows,al - end ['AX']; + regs.ax:=$160a; + intr($2f,regs); + inWindows:=regs.ax=0; InitializeGraph; end. |