Browse Source

* Dotted filenames for package ptc

Michaël Van Canneyt 2 years ago
parent
commit
7378994ec5
31 changed files with 232 additions and 12 deletions
  1. 3 0
      packages/ptc/namespaced/PTC.Dos.Cga.pp
  2. 3 0
      packages/ptc/namespaced/PTC.Dos.Mouse33h.pp
  3. 3 0
      packages/ptc/namespaced/PTC.Dos.Textfx2.pp
  4. 3 0
      packages/ptc/namespaced/PTC.Dos.Timeunit.pp
  5. 3 0
      packages/ptc/namespaced/PTC.Dos.Vesa.pp
  6. 3 0
      packages/ptc/namespaced/PTC.Dos.Vga.pp
  7. 3 0
      packages/ptc/namespaced/PTC.EventQueue.pp
  8. 3 0
      packages/ptc/namespaced/PTC.Tinyptc.pp
  9. 3 0
      packages/ptc/namespaced/PTC.Win32.P_ddraw.pp
  10. 3 0
      packages/ptc/namespaced/PTC.Win32.P_dinput.pp
  11. 3 0
      packages/ptc/namespaced/PTC.WinCE.Ddraw.pas
  12. 3 0
      packages/ptc/namespaced/PTC.WinCE.P_gx.pp
  13. 3 0
      packages/ptc/namespaced/PTC.Wrapper.pp
  14. 35 0
      packages/ptc/namespaces.lst
  15. 7 0
      packages/ptc/src/dos/base/mouse33h.pp
  16. 7 0
      packages/ptc/src/dos/cga/cga.pp
  17. 7 0
      packages/ptc/src/dos/textfx2/textfx2.pp
  18. 2 0
      packages/ptc/src/dos/timeunit/timeunit.pp
  19. 7 0
      packages/ptc/src/dos/vesa/vesa.pp
  20. 7 0
      packages/ptc/src/dos/vga/vga.pp
  21. 54 2
      packages/ptc/src/ptc.pp
  22. 7 0
      packages/ptc/src/ptcwrapper/ptceventqueue.pp
  23. 8 0
      packages/ptc/src/ptcwrapper/ptcwrapper_mt.inc
  24. 7 0
      packages/ptc/src/ptcwrapper/ptcwrapper_st.inc
  25. 7 0
      packages/ptc/src/tinyptc/tinyptc.pp
  26. 2 2
      packages/ptc/src/win32/base/win32event.inc
  27. 7 0
      packages/ptc/src/win32/directx/p_ddraw.pp
  28. 14 7
      packages/ptc/src/win32/directx/p_dinput.pp
  29. 1 1
      packages/ptc/src/win32/directx/win32directxhook.inc
  30. 7 0
      packages/ptc/src/wince/directx/ddraw.pas
  31. 7 0
      packages/ptc/src/wince/gapi/p_gx.pp

+ 3 - 0
packages/ptc/namespaced/PTC.Dos.Cga.pp

@@ -0,0 +1,3 @@
+unit PTC.Dos.Cga;
+{$DEFINE FPC_DOTTEDUNITS}
+{$i cga.pp}

+ 3 - 0
packages/ptc/namespaced/PTC.Dos.Mouse33h.pp

@@ -0,0 +1,3 @@
+unit PTC.Dos.Mouse33h;
+{$DEFINE FPC_DOTTEDUNITS}
+{$i mouse33h.pp}

+ 3 - 0
packages/ptc/namespaced/PTC.Dos.Textfx2.pp

@@ -0,0 +1,3 @@
+unit PTC.Dos.Textfx2;
+{$DEFINE FPC_DOTTEDUNITS}
+{$i textfx2.pp}

+ 3 - 0
packages/ptc/namespaced/PTC.Dos.Timeunit.pp

@@ -0,0 +1,3 @@
+unit PTC.Dos.Timeunit;
+{$DEFINE FPC_DOTTEDUNITS}
+{$i timeunit.pp}

+ 3 - 0
packages/ptc/namespaced/PTC.Dos.Vesa.pp

@@ -0,0 +1,3 @@
+unit PTC.Dos.Vesa;
+{$DEFINE FPC_DOTTEDUNITS}
+{$i vesa.pp}

+ 3 - 0
packages/ptc/namespaced/PTC.Dos.Vga.pp

@@ -0,0 +1,3 @@
+unit PTC.Dos.Vga;
+{$DEFINE FPC_DOTTEDUNITS}
+{$i vga.pp}

+ 3 - 0
packages/ptc/namespaced/PTC.EventQueue.pp

@@ -0,0 +1,3 @@
+unit PTC.EventQueue;
+{$DEFINE FPC_DOTTEDUNITS}
+{$i ptceventqueue.pp}

+ 3 - 0
packages/ptc/namespaced/PTC.Tinyptc.pp

@@ -0,0 +1,3 @@
+unit PTC.Tinyptc;
+{$DEFINE FPC_DOTTEDUNITS}
+{$i tinyptc.pp}

+ 3 - 0
packages/ptc/namespaced/PTC.Win32.P_ddraw.pp

@@ -0,0 +1,3 @@
+unit PTC.Win32.P_ddraw;
+{$DEFINE FPC_DOTTEDUNITS}
+{$i p_ddraw.pp}

+ 3 - 0
packages/ptc/namespaced/PTC.Win32.P_dinput.pp

@@ -0,0 +1,3 @@
+unit PTC.Win32.P_dinput;
+{$DEFINE FPC_DOTTEDUNITS}
+{$i p_dinput.pp}

+ 3 - 0
packages/ptc/namespaced/PTC.WinCE.Ddraw.pas

@@ -0,0 +1,3 @@
+unit PTC.WinCE.Ddraw;
+{$DEFINE FPC_DOTTEDUNITS}
+{$i ddraw.pas}

+ 3 - 0
packages/ptc/namespaced/PTC.WinCE.P_gx.pp

@@ -0,0 +1,3 @@
+unit PTC.WinCE.P_gx;
+{$DEFINE FPC_DOTTEDUNITS}
+{$i p_gx.pp}

+ 3 - 0
packages/ptc/namespaced/PTC.Wrapper.pp

@@ -0,0 +1,3 @@
+unit PTC.Wrapper;
+{$DEFINE FPC_DOTTEDUNITS}
+{$i ptcwrapper.pp}

+ 35 - 0
packages/ptc/namespaces.lst

@@ -0,0 +1,35 @@
+src/win32/directx/p_dinput.pp=namespaced/PTC.Win32.P_dinput.pp
+{s*:src/win32/directx/}=namespaced/
+{i+:src/win32/directx/}
+src/win32/directx/p_ddraw.pp=namespaced/PTC.Win32.P_ddraw.pp
+src/dos/vesa/vesa.pp=namespaced/PTC.Dos.Vesa.pp
+{s*:src/dos/vesa/}=namespaced/
+{i+:src/dos/vesa/}
+src/dos/textfx2/textfx2.pp=namespaced/PTC.Dos.Textfx2.pp
+{s*:src/dos/textfx2/}=namespaced/
+{i+:src/dos/textfx2/}
+src/dos/vga/vga.pp=namespaced/PTC.Dos.Vga.pp
+{s*:src/dos/vga/}=namespaced/
+{i+:src/dos/vga/}
+src/dos/base/mouse33h.pp=namespaced/PTC.Dos.Mouse33h.pp
+{s*:src/dos/base/}=namespaced/
+{i+:src/dos/base/}
+src/dos/timeunit/timeunit.pp=namespaced/PTC.Dos.Timeunit.pp
+{s*:src/dos/timeunit/}=namespaced/
+{i+:src/dos/timeunit/}
+src/dos/cga/cga.pp=namespaced/PTC.Dos.Cga.pp
+{s*:src/dos/cga/}=namespaced/
+{i+:src/dos/cga/}
+src/wince/gapi/p_gx.pp=namespaced/PTC.WinCE.P_gx.pp
+{s*:src/wince/gapi/}=namespaced/
+{i+:src/wince/gapi/}
+src/wince/directx/ddraw.pas=namespaced/PTC.WinCE.Ddraw.pas
+{s*:src/wince/directx/}=namespaced/
+{i+:src/wince/directx/}
+src/tinyptc/tinyptc.pp=namespaced/PTC.Tinyptc.pp
+{s*:src/tinyptc/}=namespaced/
+{i+:src/tinyptc/}
+src/ptcwrapper/ptceventqueue.pp=namespaced/PTC.EventQueue.pp
+src/ptcwrapper/ptcwrapper.pp=namespaced/PTC.Wrapper.pp
+{s*:src/ptcwrapper/}=namespaced/
+{i+:src/ptcwrapper/}

+ 7 - 0
packages/ptc/src/dos/base/mouse33h.pp

@@ -29,7 +29,9 @@
     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 }
 }
 
 
+{$IFNDEF FPC_DOTTEDUNITS}
 unit mouse33h;
 unit mouse33h;
+{$ENDIF FPC_DOTTEDUNITS}
 
 
 {$MODE objfpc}
 {$MODE objfpc}
 
 
@@ -49,8 +51,13 @@ var
 
 
 implementation
 implementation
 
 
+{$IFDEF FPC_DOTTEDUNITS}
+uses
+  DOSApi.GO32;
+{$ELSE FPC_DOTTEDUNITS}
 uses
 uses
   go32;
   go32;
+{$ENDIF FPC_DOTTEDUNITS}
 
 
 procedure InitMouse;
 procedure InitMouse;
 
 

+ 7 - 0
packages/ptc/src/dos/cga/cga.pp

@@ -29,7 +29,9 @@
     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 }
 }
 
 
+{$IFNDEF FPC_DOTTEDUNITS}
 unit CGA;
 unit CGA;
+{$ENDIF FPC_DOTTEDUNITS}
 
 
 {$MODE objfpc}
 {$MODE objfpc}
 {$ASMMODE intel}
 {$ASMMODE intel}
@@ -47,8 +49,13 @@ procedure CGAFree;
 
 
 implementation
 implementation
 
 
+{$IFDEF FPC_DOTTEDUNITS}
+uses
+  DOSApi.GO32, System.Console.Crt;
+{$ELSE FPC_DOTTEDUNITS}
 uses
 uses
   go32, crt;
   go32, crt;
+{$ENDIF FPC_DOTTEDUNITS}
 
 
 const
 const
   palette: array[0..15, 0..2] of Byte = (
   palette: array[0..15, 0..2] of Byte = (

+ 7 - 0
packages/ptc/src/dos/textfx2/textfx2.pp

@@ -16,7 +16,9 @@
 {$MODE objfpc}
 {$MODE objfpc}
 {$INLINE on}
 {$INLINE on}
 
 
+{$IFNDEF FPC_DOTTEDUNITS}
 unit textfx2;
 unit textfx2;
+{$ENDIF FPC_DOTTEDUNITS}
 
 
 interface
 interface
 
 
@@ -127,8 +129,13 @@ procedure dump_320x(y0, y1: Integer; buffer: PInteger);
 
 
 implementation
 implementation
 
 
+{$IFDEF FPC_DOTTEDUNITS}
+uses
+  DOSApi.GO32;
+{$ELSE FPC_DOTTEDUNITS}
 uses
 uses
   go32;
   go32;
+{$ENDIF FPC_DOTTEDUNITS}
 
 
 { $define __USE_178NOT176}
 { $define __USE_178NOT176}
  { uncomment to use 75% AnsiChar instead of 25% AnsiChar }
  { uncomment to use 75% AnsiChar instead of 25% AnsiChar }

+ 2 - 0
packages/ptc/src/dos/timeunit/timeunit.pp

@@ -33,7 +33,9 @@
 {$ASMMODE intel}
 {$ASMMODE intel}
 {$GOTO on}
 {$GOTO on}
 
 
+{$IFNDEF FPC_DOTTEDUNITS}
 unit timeunit;
 unit timeunit;
+{$ENDIF FPC_DOTTEDUNITS}
 
 
 interface
 interface
 
 

+ 7 - 0
packages/ptc/src/dos/vesa/vesa.pp

@@ -32,7 +32,9 @@
 {$MODE objfpc}{$H+}
 {$MODE objfpc}{$H+}
 {$ASMMODE intel}
 {$ASMMODE intel}
 
 
+{$IFNDEF FPC_DOTTEDUNITS}
 unit VESA;
 unit VESA;
+{$ENDIF FPC_DOTTEDUNITS}
 
 
 interface
 interface
 
 
@@ -297,8 +299,13 @@ function LFBNearPtrAccessPtr: Pointer;
 
 
 implementation
 implementation
 
 
+{$IFDEF FPC_DOTTEDUNITS}
+uses
+  DOSApi.GO32;
+{$ELSE FPC_DOTTEDUNITS}
 uses
 uses
   go32;
   go32;
+{$ENDIF FPC_DOTTEDUNITS}
 
 
 type
 type
   TVBEInfoBlock = packed record
   TVBEInfoBlock = packed record

+ 7 - 0
packages/ptc/src/dos/vga/vga.pp

@@ -35,7 +35,9 @@
 
 
 {$DEFINE X86_ASSEMBLER}
 {$DEFINE X86_ASSEMBLER}
 
 
+{$IFNDEF FPC_DOTTEDUNITS}
 unit vga;
 unit vga;
+{$ENDIF FPC_DOTTEDUNITS}
 
 
 interface
 interface
 
 
@@ -65,8 +67,13 @@ procedure fakemode_load(src: PByte; wvr: Boolean);
 
 
 implementation
 implementation
 
 
+{$IFDEF FPC_DOTTEDUNITS}
+uses
+  DOSApi.GO32;
+{$ELSE FPC_DOTTEDUNITS}
 uses
 uses
   go32;
   go32;
+{$ENDIF FPC_DOTTEDUNITS}
 
 
 var
 var
   RealRegs: TRealRegs;
   RealRegs: TRealRegs;

+ 54 - 2
packages/ptc/src/ptc.pp

@@ -63,10 +63,13 @@ unit ptc;
 
 
 interface
 interface
 
 
-{$IFNDEF FPDOC}
+{$IFDEF FPC_DOTTEDUNITS}
+uses
+  Api.Hermes;
+{$ELSE FPC_DOTTEDUNITS}
 uses
 uses
   Hermes;
   Hermes;
-{$ENDIF FPDOC}
+{$ENDIF FPC_DOTTEDUNITS}
 
 
 const
 const
   PTCPAS_VERSION = 'PTCPas 0.99.16';
   PTCPAS_VERSION = 'PTCPas 0.99.16';
@@ -115,6 +118,54 @@ type
 
 
 implementation
 implementation
 
 
+{$IFDEF FPC_DOTTEDUNITS}
+{$IFDEF GO32V2}
+uses
+  PTC.Dos.Textfx2, PTC.Dos.Vesa, PTC.Dos.Vga, PTC.Dos.Cga, PTC.Dos.Timeunit, System.Console.Crt, DOSApi.GO32, PTC.Dos.Mouse33h;
+{$ENDIF GO32V2}
+
+{$IF defined(WIN32) OR defined(WIN64)}
+uses
+  WinApi.Windows, PTC.Win32.P_ddraw, Api.OpenGL.Glext;
+{$ENDIF defined(WIN32) OR defined(WIN64)}
+
+{$IFDEF WinCE}
+uses
+  WinApi.Windows, PTC.WinCE.P_gx;
+{$ENDIF WinCE}
+
+{$IFDEF Unix}
+uses
+  UnixApi.Base, UnixApi.Unix
+  {$IFDEF X11}
+    , System.CTypes, Api.X11.X, Api.X11.Xlib, Api.X11.Xutil, Api.X11.Xatom, Api.X11.Keysym, Api.X11.Xkblib
+    {$IFDEF ENABLE_X11_EXTENSION_XRANDR}
+    , Api.X11.Xrandr
+    {$ENDIF ENABLE_X11_EXTENSION_XRANDR}
+    {$IFDEF ENABLE_X11_EXTENSION_XF86VIDMODE}
+    , Api.X11.Xf86vmode
+    {$ENDIF ENABLE_X11_EXTENSION_XF86VIDMODE}
+    {$IFDEF ENABLE_X11_EXTENSION_XF86DGA}
+    , Api.X11.Xf86dga
+    {$ENDIF ENABLE_X11_EXTENSION_XF86DGA}
+    {$IFDEF ENABLE_X11_EXTENSION_XSHM}
+    , Api.X11.Xshm, UnixApi.Ipc
+    {$ENDIF ENABLE_X11_EXTENSION_XSHM}
+    {$IFDEF ENABLE_X11_EXTENSION_GLX}
+    , Api.OpenGL.Glx
+    {$ENDIF ENABLE_X11_EXTENSION_GLX}
+    {$IFDEF ENABLE_X11_EXTENSION_XINPUT2}
+    , Api.X11.Xi2, Api.X11.Xinput2
+    {$ENDIF ENABLE_X11_EXTENSION_XINPUT2}
+  {$ENDIF X11}
+  {$IFDEF COCOA}
+    , Api.Cocoa.CocoaAll
+  {$ENDIF COCOA}
+  ;
+{$ENDIF Unix}
+
+{$ELSE FPC_DOTTEDUNITS}
+
 {$IFDEF GO32V2}
 {$IFDEF GO32V2}
 uses
 uses
   textfx2, vesa, vga, cga, timeunit, crt, go32, mouse33h;
   textfx2, vesa, vga, cga, timeunit, crt, go32, mouse33h;
@@ -159,6 +210,7 @@ uses
   {$ENDIF COCOA}
   {$ENDIF COCOA}
   ;
   ;
 {$ENDIF UNIX}
 {$ENDIF UNIX}
+{$ENDIF FPC_DOTTEDUNITS}
 
 
 { this little procedure is not a good reason to include the whole sysutils
 { this little procedure is not a good reason to include the whole sysutils
   unit :) }
   unit :) }

+ 7 - 0
packages/ptc/src/ptcwrapper/ptceventqueue.pp

@@ -30,14 +30,21 @@
     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 }
 }
 
 
+{$IFNDEF FPC_DOTTEDUNITS}
 unit ptceventqueue;
 unit ptceventqueue;
+{$ENDIF FPC_DOTTEDUNITS}
 
 
 {$MODE objfpc}{$H+}
 {$MODE objfpc}{$H+}
 
 
 interface
 interface
 
 
+{$IFDEF FPC_DOTTEDUNITS}
+uses
+  System.SysUtils, Ptc;
+{$ELSE FPC_DOTTEDUNITS}
 uses
 uses
   SysUtils, ptc;
   SysUtils, ptc;
+{$ENDIF FPC_DOTTEDUNITS}
 
 
 type
 type
   PEventLinkedList = ^TEventLinkedList;
   PEventLinkedList = ^TEventLinkedList;

+ 8 - 0
packages/ptc/src/ptcwrapper/ptcwrapper_mt.inc

@@ -29,15 +29,23 @@
     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 }
 }
 
 
+{$IFNDEF FPC_DOTTEDUNITS}
 unit ptcwrapper;
 unit ptcwrapper;
+{$ENDIF FPC_DOTTEDUNITS}
 
 
 {$MODE objfpc}{$H+}
 {$MODE objfpc}{$H+}
 
 
 interface
 interface
 
 
+{$IFDEF FPC_DOTTEDUNITS}
+uses
+  {$IFDEF UnixApi.Unix}UnixApi.CThreads,{$ENDIF}
+  System.SysUtils, System.Classes, System.SyncObjs, Ptc, PTC.EventQueue;
+{$ELSE FPC_DOTTEDUNITS}
 uses
 uses
   {$IFDEF unix}cthreads,{$ENDIF}
   {$IFDEF unix}cthreads,{$ENDIF}
   SysUtils, Classes, syncobjs, ptc, ptceventqueue;
   SysUtils, Classes, syncobjs, ptc, ptceventqueue;
+{$ENDIF FPC_DOTTEDUNITS}
 
 
 type
 type
   TPTCWrapperOpenType = (pwotDefault, pwotFormat, pwotWidthHeightFormat, pwotMode);
   TPTCWrapperOpenType = (pwotDefault, pwotFormat, pwotWidthHeightFormat, pwotMode);

+ 7 - 0
packages/ptc/src/ptcwrapper/ptcwrapper_st.inc

@@ -29,14 +29,21 @@
     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 }
 }
 
 
+{$IFNDEF FPC_DOTTEDUNITS}
 unit ptcwrapper;
 unit ptcwrapper;
+{$ENDIF FPC_DOTTEDUNITS}
 
 
 {$MODE objfpc}{$H+}
 {$MODE objfpc}{$H+}
 
 
 interface
 interface
 
 
+{$IFDEF FPC_DOTTEDUNITS}
+uses
+  System.SysUtils, System.Classes, Ptc, PTC.EventQueue;
+{$ELSE FPC_DOTTEDUNITS}
 uses
 uses
   SysUtils, Classes, ptc, ptceventqueue;
   SysUtils, Classes, ptc, ptceventqueue;
+{$ENDIF FPC_DOTTEDUNITS}
 
 
 type
 type
   TPTCWrapperThread = class
   TPTCWrapperThread = class

+ 7 - 0
packages/ptc/src/tinyptc/tinyptc.pp

@@ -1,4 +1,6 @@
+{$IFNDEF FPC_DOTTEDUNITS}
 unit TinyPTC;
 unit TinyPTC;
+{$ENDIF FPC_DOTTEDUNITS}
 
 
 {$MODE objfpc}
 {$MODE objfpc}
 
 
@@ -10,8 +12,13 @@ procedure ptc_close;
 
 
 implementation
 implementation
 
 
+{$IFDEF FPC_DOTTEDUNITS}
+uses
+  System.SysUtils, Ptc;
+{$ELSE FPC_DOTTEDUNITS}
 uses
 uses
   SysUtils, ptc;
   SysUtils, ptc;
+{$ENDIF FPC_DOTTEDUNITS}
 
 
 var
 var
   Console: TPTCConsole = nil;
   Console: TPTCConsole = nil;

+ 2 - 2
packages/ptc/src/win32/base/win32event.inc

@@ -51,13 +51,13 @@ end;
 procedure TWin32Event.SetEvent;
 procedure TWin32Event.SetEvent;
 begin
 begin
   { set event }
   { set event }
-  windows.SetEvent(FEvent);
+  {$IFDEF FPC_DOTTEDUNITS}WinApi.{$ENDIF}Windows.SetEvent(FEvent);
 end;
 end;
 
 
 procedure TWin32Event.ResetEvent;
 procedure TWin32Event.ResetEvent;
 begin
 begin
   { reset event }
   { reset event }
-  windows.ResetEvent(FEvent);
+  {$IFDEF FPC_DOTTEDUNITS}WinApi.{$ENDIF}Windows.ResetEvent(FEvent);
 end;
 end;
 
 
 procedure TWin32Event.WaitForEvent;
 procedure TWin32Event.WaitForEvent;

+ 7 - 0
packages/ptc/src/win32/directx/p_ddraw.pp

@@ -7,7 +7,9 @@
  *
  *
  ***************************************************************************)
  ***************************************************************************)
 
 
+{$IFNDEF FPC_DOTTEDUNITS}
 unit p_ddraw;
 unit p_ddraw;
+{$ENDIF FPC_DOTTEDUNITS}
 
 
 {$MODE objfpc}{$H+}
 {$MODE objfpc}{$H+}
 {$MACRO on}
 {$MACRO on}
@@ -19,8 +21,13 @@ unit p_ddraw;
 
 
 interface
 interface
 
 
+{$IFDEF FPC_DOTTEDUNITS}
+uses
+  WinApi.Windows;
+{$ELSE FPC_DOTTEDUNITS}
 uses
 uses
   windows;
   windows;
+{$ENDIF FPC_DOTTEDUNITS}
 
 
 {#ifndef __DDRAW_INCLUDED__
 {#ifndef __DDRAW_INCLUDED__
 #define __DDRAW_INCLUDED__
 #define __DDRAW_INCLUDED__

+ 14 - 7
packages/ptc/src/win32/directx/p_dinput.pp

@@ -7,7 +7,9 @@
  *
  *
  ****************************************************************************)
  ****************************************************************************)
 
 
+{$IFNDEF FPC_DOTTEDUNITS}
 unit p_dinput;
 unit p_dinput;
+{$ENDIF FPC_DOTTEDUNITS}
 
 
 {$MODE objfpc}{$H+}
 {$MODE objfpc}{$H+}
 {$MACRO on}
 {$MACRO on}
@@ -17,8 +19,13 @@ unit p_dinput;
 
 
 interface
 interface
 
 
+{$IFDEF FPC_DOTTEDUNITS}
+uses
+  WinApi.Windows;
+{$ELSE FPC_DOTTEDUNITS}
 uses
 uses
   windows;
   windows;
+{$ENDIF FPC_DOTTEDUNITS}
 
 
 //#ifndef __DINPUT_INCLUDED__
 //#ifndef __DINPUT_INCLUDED__
 //#define __DINPUT_INCLUDED__
 //#define __DINPUT_INCLUDED__
@@ -342,13 +349,13 @@ const
   DIEP_DIRECTION              = $00000040;
   DIEP_DIRECTION              = $00000040;
   DIEP_ENVELOPE               = $00000080;
   DIEP_ENVELOPE               = $00000080;
   DIEP_TYPESPECIFICPARAMS     = $00000100;
   DIEP_TYPESPECIFICPARAMS     = $00000100;
-{$IF DIRECTINPUT_VERSION >= 0x0600}
+{$IF DIRECTINPUT_VERSION >= $0600}
   DIEP_STARTDELAY             = $00000200;
   DIEP_STARTDELAY             = $00000200;
   DIEP_ALLPARAMS_DX5          = $000001FF;
   DIEP_ALLPARAMS_DX5          = $000001FF;
   DIEP_ALLPARAMS              = $000003FF;
   DIEP_ALLPARAMS              = $000003FF;
-{$ELSE} { DIRECTINPUT_VERSION < 0x0600 }
+{$ELSE} { DIRECTINPUT_VERSION < $0600 }
   DIEP_ALLPARAMS              = $000001FF;
   DIEP_ALLPARAMS              = $000001FF;
-{$ENDIF} { DIRECTINPUT_VERSION < 0x0600 }
+{$ENDIF} { DIRECTINPUT_VERSION < $0600 }
   DIEP_START                  = $20000000;
   DIEP_START                  = $20000000;
   DIEP_NORESTART              = $40000000;
   DIEP_NORESTART              = $40000000;
   DIEP_NODOWNLOAD             = $80000000;
   DIEP_NODOWNLOAD             = $80000000;
@@ -468,7 +475,7 @@ const
   DI8DEVTYPE_SCREENPOINTER = $1A;
   DI8DEVTYPE_SCREENPOINTER = $1A;
   DI8DEVTYPE_REMOTE        = $1B;
   DI8DEVTYPE_REMOTE        = $1B;
   DI8DEVTYPE_SUPPLEMENTAL  = $1C;
   DI8DEVTYPE_SUPPLEMENTAL  = $1C;
-{$ENDIF} { DIRECTINPUT_VERSION <= 0x700 }
+{$ENDIF} { DIRECTINPUT_VERSION <= $700 }
 
 
 const
 const
   DIDEVTYPE_HID            = $00010000;
   DIDEVTYPE_HID            = $00010000;
@@ -594,7 +601,7 @@ type
     dwButtons: DWORD;
     dwButtons: DWORD;
     dwPOVs: DWORD;
     dwPOVs: DWORD;
   end;
   end;
-{$ENDIF} { DIRECTINPUT_VERSION >= 0x0500 }
+{$ENDIF} { DIRECTINPUT_VERSION >= $0500 }
 
 
   LPDIDEVCAPS = ^TDIDEVCAPS;
   LPDIDEVCAPS = ^TDIDEVCAPS;
   PDIDEVCAPS = ^TDIDEVCAPS;
   PDIDEVCAPS = ^TDIDEVCAPS;
@@ -721,7 +728,7 @@ var
   c_dfDIJoystick: TDIDATAFORMAT; cvar; external;
   c_dfDIJoystick: TDIDATAFORMAT; cvar; external;
 //extern const DIDATAFORMAT c_dfDIJoystick2;
 //extern const DIDATAFORMAT c_dfDIJoystick2;
   c_dfDIJoystick2: TDIDATAFORMAT; cvar; external;
   c_dfDIJoystick2: TDIDATAFORMAT; cvar; external;
-{$ENDIF} { DIRECTINPUT_VERSION >= 0x0500 }
+{$ENDIF} { DIRECTINPUT_VERSION >= $0500 }
 
 
 //#ifdef __cplusplus
 //#ifdef __cplusplus
 //};
 //};
@@ -1204,7 +1211,7 @@ const
   DIPH_BYUSAGE          = 3;
   DIPH_BYUSAGE          = 3;
 {$ENDIF} { DIRECTINPUT_VERSION >= $050a }
 {$ENDIF} { DIRECTINPUT_VERSION >= $050a }
 
 
-//#if(DIRECTINPUT_VERSION >= 0x050a)
+//#if(DIRECTINPUT_VERSION >= $050a)
 //#define DIMAKEUSAGEDWORD(UsagePage, Usage) \
 //#define DIMAKEUSAGEDWORD(UsagePage, Usage) \
 //                                (DWORD)MAKELONG(Usage, UsagePage)
 //                                (DWORD)MAKELONG(Usage, UsagePage)
 //#endif /* DIRECTINPUT_VERSION >= 0x050a */
 //#endif /* DIRECTINPUT_VERSION >= 0x050a */

+ 1 - 1
packages/ptc/src/win32/directx/win32directxhook.inc

@@ -142,7 +142,7 @@ begin
     WM_PALETTECHANGED:
     WM_PALETTECHANGED:
       begin
       begin
         LOG('TDirectXHook WM_PALETTECHANGED');
         LOG('TDirectXHook WM_PALETTECHANGED');
-        if Windows.HWND(wParam) <> hWnd then
+        if {$IFDEF FPC_DOTTEDUNITS}WinApi.{$ENDIF}Windows.HWND(wParam) <> hWnd then
         begin
         begin
           LOG('not our window');
           LOG('not our window');
           if FConsole.FPrimary.Active then
           if FConsole.FPrimary.Active then

+ 7 - 0
packages/ptc/src/wince/directx/ddraw.pas

@@ -16,15 +16,22 @@
  *  Content:    DirectDraw include file
  *  Content:    DirectDraw include file
  *
  *
  ***************************************************************************)
  ***************************************************************************)
+{$IFNDEF FPC_DOTTEDUNITS}
 unit ddraw;
 unit ddraw;
+{$ENDIF FPC_DOTTEDUNITS}
 
 
 interface
 interface
 
 
 {$MODE objfpc}{$H+}
 {$MODE objfpc}{$H+}
 {$PACKRECORDS c}
 {$PACKRECORDS c}
 
 
+{$IFDEF FPC_DOTTEDUNITS}
+uses
+  WinApi.Windows;
+{$ELSE FPC_DOTTEDUNITS}
 uses
 uses
   Windows;
   Windows;
+{$ENDIF FPC_DOTTEDUNITS}
 
 
 //#pragma once
 //#pragma once
 
 

+ 7 - 0
packages/ptc/src/wince/gapi/p_gx.pp

@@ -1,4 +1,6 @@
+{$IFNDEF FPC_DOTTEDUNITS}
 unit p_gx;
 unit p_gx;
+{$ENDIF FPC_DOTTEDUNITS}
 
 
 {$MODE objfpc}
 {$MODE objfpc}
 
 
@@ -7,8 +9,13 @@ unit p_gx;
 
 
 interface
 interface
 
 
+{$IFDEF FPC_DOTTEDUNITS}
+uses
+  WinApi.Windows;
+{$ELSE FPC_DOTTEDUNITS}
 uses
 uses
   Windows;
   Windows;
+{$ENDIF FPC_DOTTEDUNITS}
 
 
 const
 const
   GXDLL = 'gx';
   GXDLL = 'gx';