From ddce652cae19a552fb9d4f60dbf14fe595fedd1b Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Fri, 17 Mar 2000 16:58:10 +0000 Subject: [PATCH] Made ddraw and dinput separate dlls. --- Make.rules.in | 2 ++ configure | 4 ++++ configure.in | 2 ++ dlls/Makefile.in | 8 +++++++ dlls/ddraw/.cvsignore | 3 +++ dlls/ddraw/Makefile.in | 23 +++++++++++++++++++ {graphics => dlls/ddraw}/d3d_private.h | 0 {graphics => dlls/ddraw}/d3dcommon.c | 0 {graphics => dlls/ddraw}/d3ddevices.c | 0 {graphics => dlls/ddraw}/d3dexecutebuffer.c | 0 {graphics => dlls/ddraw}/d3dlight.c | 0 {graphics => dlls/ddraw}/d3dmaterial.c | 0 {graphics => dlls/ddraw}/d3dtexture.c | 0 {graphics => dlls/ddraw}/d3dviewport.c | 0 {relay32 => dlls/ddraw}/ddraw.spec | 0 graphics/ddraw.c => dlls/ddraw/ddraw_main.c | 0 {graphics => dlls/ddraw}/ddraw_private.h | 0 dlls/dinput/.cvsignore | 3 +++ dlls/dinput/Makefile.in | 16 +++++++++++++ {relay32 => dlls/dinput}/dinput.spec | 0 windows/dinput.c => dlls/dinput/dinput_main.c | 2 +- graphics/Makefile.in | 8 ------- graphics/vga.c | 9 +++++++- relay32/Makefile.in | 2 -- windows/Makefile.in | 1 - 25 files changed, 70 insertions(+), 13 deletions(-) create mode 100644 dlls/ddraw/.cvsignore create mode 100644 dlls/ddraw/Makefile.in rename {graphics => dlls/ddraw}/d3d_private.h (100%) rename {graphics => dlls/ddraw}/d3dcommon.c (100%) rename {graphics => dlls/ddraw}/d3ddevices.c (100%) rename {graphics => dlls/ddraw}/d3dexecutebuffer.c (100%) rename {graphics => dlls/ddraw}/d3dlight.c (100%) rename {graphics => dlls/ddraw}/d3dmaterial.c (100%) rename {graphics => dlls/ddraw}/d3dtexture.c (100%) rename {graphics => dlls/ddraw}/d3dviewport.c (100%) rename {relay32 => dlls/ddraw}/ddraw.spec (100%) rename graphics/ddraw.c => dlls/ddraw/ddraw_main.c (100%) rename {graphics => dlls/ddraw}/ddraw_private.h (100%) create mode 100644 dlls/dinput/.cvsignore create mode 100644 dlls/dinput/Makefile.in rename {relay32 => dlls/dinput}/dinput.spec (100%) rename windows/dinput.c => dlls/dinput/dinput_main.c (99%) diff --git a/Make.rules.in b/Make.rules.in index 8c74900189..0fdd734943 100644 --- a/Make.rules.in +++ b/Make.rules.in @@ -85,6 +85,8 @@ DLLS = \ comctl32 \ comdlg32 \ dciman32 \ + ddraw \ + dinput \ dplayx \ dsound \ icmp \ diff --git a/configure b/configure index f625d26156..06a8fdd719 100755 --- a/configure +++ b/configure @@ -6185,6 +6185,8 @@ dlls/comctl32/Makefile dlls/commdlg/Makefile dlls/crtdll/Makefile dlls/dciman32/Makefile +dlls/ddraw/Makefile +dlls/dinput/Makefile dlls/display/Makefile dlls/dplayx/Makefile dlls/dsound/Makefile @@ -6401,6 +6403,8 @@ dlls/comctl32/Makefile dlls/commdlg/Makefile dlls/crtdll/Makefile dlls/dciman32/Makefile +dlls/ddraw/Makefile +dlls/dinput/Makefile dlls/display/Makefile dlls/dplayx/Makefile dlls/dsound/Makefile diff --git a/configure.in b/configure.in index ef8024d0ab..b7391c94b3 100644 --- a/configure.in +++ b/configure.in @@ -947,6 +947,8 @@ dlls/comctl32/Makefile dlls/commdlg/Makefile dlls/crtdll/Makefile dlls/dciman32/Makefile +dlls/ddraw/Makefile +dlls/dinput/Makefile dlls/display/Makefile dlls/dplayx/Makefile dlls/dsound/Makefile diff --git a/dlls/Makefile.in b/dlls/Makefile.in index 45a5bfdfbd..82696c5f94 100644 --- a/dlls/Makefile.in +++ b/dlls/Makefile.in @@ -8,6 +8,8 @@ DLLFILES = \ comctl32/libcomctl32.@LIBEXT@ \ commdlg/libcomdlg32.@LIBEXT@ \ dciman32/libdciman32.@LIBEXT@ \ + ddraw/libddraw.@LIBEXT@ \ + dinput/libdinput.@LIBEXT@ \ dplayx/libdplayx.@LIBEXT@ \ dsound/libdsound.@LIBEXT@ \ icmp/libicmp.@LIBEXT@ \ @@ -94,6 +96,12 @@ libcomdlg32.@LIBEXT@ libcommdlg.@LIBEXT@: commdlg/libcomdlg32.@LIBEXT@ libdciman32.@LIBEXT@: dciman32/libdciman32.@LIBEXT@ $(RM) $@ && $(LN_S) dciman32/libdciman32.@LIBEXT@ $@ +libddraw.@LIBEXT@: ddraw/libddraw.@LIBEXT@ + $(RM) $@ && $(LN_S) ddraw/libddraw.@LIBEXT@ $@ + +libdinput.@LIBEXT@: dinput/libdinput.@LIBEXT@ + $(RM) $@ && $(LN_S) dinput/libdinput.@LIBEXT@ $@ + libdplayx.@LIBEXT@ libdplay.@LIBEXT@: dplayx/libdplayx.@LIBEXT@ $(RM) $@ && $(LN_S) dplayx/libdplayx.@LIBEXT@ $@ diff --git a/dlls/ddraw/.cvsignore b/dlls/ddraw/.cvsignore new file mode 100644 index 0000000000..2586cb49cb --- /dev/null +++ b/dlls/ddraw/.cvsignore @@ -0,0 +1,3 @@ +Makefile +ddraw.spec.c +libddraw.so.1.0 diff --git a/dlls/ddraw/Makefile.in b/dlls/ddraw/Makefile.in new file mode 100644 index 0000000000..abd64aa68f --- /dev/null +++ b/dlls/ddraw/Makefile.in @@ -0,0 +1,23 @@ +TOPSRCDIR = @top_srcdir@ +TOPOBJDIR = ../.. +SRCDIR = @srcdir@ +VPATH = @srcdir@ +MODULE = ddraw +SOVERSION = 1.0 + +SPEC_SRCS = ddraw.spec + +C_SRCS = \ + d3dcommon.c \ + d3ddevices.c \ + d3dexecutebuffer.c \ + d3dlight.c \ + d3dmaterial.c \ + d3dtexture.c \ + d3dviewport.c \ + ddraw_main.c + +@MAKE_DLL_RULES@ + +### Dependencies: + diff --git a/graphics/d3d_private.h b/dlls/ddraw/d3d_private.h similarity index 100% rename from graphics/d3d_private.h rename to dlls/ddraw/d3d_private.h diff --git a/graphics/d3dcommon.c b/dlls/ddraw/d3dcommon.c similarity index 100% rename from graphics/d3dcommon.c rename to dlls/ddraw/d3dcommon.c diff --git a/graphics/d3ddevices.c b/dlls/ddraw/d3ddevices.c similarity index 100% rename from graphics/d3ddevices.c rename to dlls/ddraw/d3ddevices.c diff --git a/graphics/d3dexecutebuffer.c b/dlls/ddraw/d3dexecutebuffer.c similarity index 100% rename from graphics/d3dexecutebuffer.c rename to dlls/ddraw/d3dexecutebuffer.c diff --git a/graphics/d3dlight.c b/dlls/ddraw/d3dlight.c similarity index 100% rename from graphics/d3dlight.c rename to dlls/ddraw/d3dlight.c diff --git a/graphics/d3dmaterial.c b/dlls/ddraw/d3dmaterial.c similarity index 100% rename from graphics/d3dmaterial.c rename to dlls/ddraw/d3dmaterial.c diff --git a/graphics/d3dtexture.c b/dlls/ddraw/d3dtexture.c similarity index 100% rename from graphics/d3dtexture.c rename to dlls/ddraw/d3dtexture.c diff --git a/graphics/d3dviewport.c b/dlls/ddraw/d3dviewport.c similarity index 100% rename from graphics/d3dviewport.c rename to dlls/ddraw/d3dviewport.c diff --git a/relay32/ddraw.spec b/dlls/ddraw/ddraw.spec similarity index 100% rename from relay32/ddraw.spec rename to dlls/ddraw/ddraw.spec diff --git a/graphics/ddraw.c b/dlls/ddraw/ddraw_main.c similarity index 100% rename from graphics/ddraw.c rename to dlls/ddraw/ddraw_main.c diff --git a/graphics/ddraw_private.h b/dlls/ddraw/ddraw_private.h similarity index 100% rename from graphics/ddraw_private.h rename to dlls/ddraw/ddraw_private.h diff --git a/dlls/dinput/.cvsignore b/dlls/dinput/.cvsignore new file mode 100644 index 0000000000..c1559dcbe5 --- /dev/null +++ b/dlls/dinput/.cvsignore @@ -0,0 +1,3 @@ +Makefile +dinput.spec.c +libdinput.so.1.0 diff --git a/dlls/dinput/Makefile.in b/dlls/dinput/Makefile.in new file mode 100644 index 0000000000..b0abec71b5 --- /dev/null +++ b/dlls/dinput/Makefile.in @@ -0,0 +1,16 @@ +TOPSRCDIR = @top_srcdir@ +TOPOBJDIR = ../.. +SRCDIR = @srcdir@ +VPATH = @srcdir@ +MODULE = dinput +SOVERSION = 1.0 + +SPEC_SRCS = dinput.spec + +C_SRCS = \ + dinput_main.c + +@MAKE_DLL_RULES@ + +### Dependencies: + diff --git a/relay32/dinput.spec b/dlls/dinput/dinput.spec similarity index 100% rename from relay32/dinput.spec rename to dlls/dinput/dinput.spec diff --git a/windows/dinput.c b/dlls/dinput/dinput_main.c similarity index 99% rename from windows/dinput.c rename to dlls/dinput/dinput_main.c index 3165bfa37c..32503f5d51 100644 --- a/windows/dinput.c +++ b/dlls/dinput/dinput_main.c @@ -53,7 +53,7 @@ #include "wingdi.h" #include "winuser.h" -DEFAULT_DEBUG_CHANNEL(dinput) +DEFAULT_DEBUG_CHANNEL(dinput); /* Wine mouse driver object instances */ #define WINE_MOUSE_X_AXIS_INSTANCE 0x0001 diff --git a/graphics/Makefile.in b/graphics/Makefile.in index c04a081a76..b9cd3d8d4e 100644 --- a/graphics/Makefile.in +++ b/graphics/Makefile.in @@ -8,14 +8,6 @@ MODULE = graphics C_SRCS = \ bitblt.c \ cache.c \ - d3dcommon.c \ - d3ddevices.c \ - d3dexecutebuffer.c \ - d3dlight.c \ - d3dmaterial.c \ - d3dtexture.c \ - d3dviewport.c \ - ddraw.c \ dispdib.c \ driver.c \ env.c \ diff --git a/graphics/vga.c b/graphics/vga.c index 1d5889c574..078bd5c39a 100644 --- a/graphics/vga.c +++ b/graphics/vga.c @@ -23,6 +23,8 @@ static DDSURFACEDESC sdesc; static LONG vga_polling,vga_refresh; static HANDLE poll_timer; +static HRESULT WINAPI (*pDirectDrawCreate)(LPGUID,LPDIRECTDRAW *,LPUNKNOWN); + static void VGA_DeinstallTimer(void) { if (poll_timer) { @@ -51,7 +53,12 @@ int VGA_SetMode(unsigned Xres,unsigned Yres,unsigned Depth) { if (lpddraw) VGA_Exit(); if (!lpddraw) { - DirectDrawCreate(NULL,&lpddraw,NULL); + if (!pDirectDrawCreate) + { + HMODULE hmod = LoadLibraryA( "ddraw.dll" ); + if (hmod) pDirectDrawCreate = GetProcAddress( hmod, "DirectDrawCreate" ); + } + if (pDirectDrawCreate) pDirectDrawCreate(NULL,&lpddraw,NULL); if (!lpddraw) { ERR("DirectDraw is not available\n"); return 1; diff --git a/relay32/Makefile.in b/relay32/Makefile.in index c63a22e7f0..abcf3a6ba4 100644 --- a/relay32/Makefile.in +++ b/relay32/Makefile.in @@ -6,8 +6,6 @@ VPATH = @srcdir@ MODULE = relay32 SPEC_SRCS = \ - ddraw.spec \ - dinput.spec \ gdi32.spec \ kernel32.spec \ user32.spec \ diff --git a/windows/Makefile.in b/windows/Makefile.in index c8fdf3d277..f6900674f4 100644 --- a/windows/Makefile.in +++ b/windows/Makefile.in @@ -13,7 +13,6 @@ C_SRCS = \ defdlg.c \ defwnd.c \ dialog.c \ - dinput.c \ driver.c \ event.c \ focus.c \