Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
c33e34cd
Commit
c33e34cd
authored
Apr 17, 2001
by
Ove Kaaven
Committed by
Alexandre Julliard
Apr 17, 2001
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fill in some of the ddraw HAL fields.
Call the set_exclusive_mode callback when necessary. Added a Main_DirectDraw_GetCaps method. Removed references to obsolete DIBTexture surface class.
parent
2043c42c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
50 additions
and
5 deletions
+50
-5
main.c
dlls/ddraw/ddraw/main.c
+45
-3
main.h
dlls/ddraw/ddraw/main.h
+5
-2
No files found.
dlls/ddraw/ddraw/main.c
View file @
c33e34cd
...
...
@@ -2,7 +2,7 @@
*
* Copyright 1997-2000 Marcus Meissner
* Copyright 1998-2000 Lionel Ulmer (most of Direct3D stuff)
* Copyright 2000 TransGaming Technologies Inc.
* Copyright 2000
-2001
TransGaming Technologies Inc.
*/
/*
...
...
@@ -30,7 +30,6 @@
#include "dsurface/main.h"
#include "dsurface/dib.h"
#include "dsurface/fakezbuffer.h"
#include "dsurface/dibtexture.h"
DEFAULT_DEBUG_CHANNEL
(
ddraw
);
...
...
@@ -54,6 +53,9 @@ HRESULT Main_DirectDraw_Construct(IDirectDrawImpl *This, BOOL ex)
This
->
ref
=
1
;
This
->
ex
=
ex
;
if
(
ex
)
This
->
local
.
dwLocalFlags
|=
DDRAWILCL_DIRECTDRAW7
;
This
->
local
.
dwProcessId
=
GetCurrentProcessId
();
This
->
final_release
=
Main_DirectDraw_final_release
;
This
->
create_palette
=
Main_DirectDrawPalette_Create
;
...
...
@@ -84,6 +86,12 @@ void Main_DirectDraw_final_release(IDirectDrawImpl* This)
Main_DirectDraw_DeleteSurfaces
(
This
);
Main_DirectDraw_DeleteClippers
(
This
);
Main_DirectDraw_DeletePalettes
(
This
);
if
(
This
->
local
.
lpGbl
&&
This
->
local
.
lpGbl
->
lpExclusiveOwner
==
&
This
->
local
)
{
This
->
local
.
lpGbl
->
lpExclusiveOwner
=
NULL
;
if
(
This
->
set_exclusive_mode
)
This
->
set_exclusive_mode
(
This
,
FALSE
);
}
}
/* There is no Main_DirectDraw_Create. */
...
...
@@ -249,7 +257,7 @@ Main_create_texture(IDirectDrawImpl* This, const DDSURFACEDESC2* pDDSD,
{
assert
(
pOuter
==
NULL
);
return
DIB
Texture
_DirectDrawSurface_Create
(
This
,
pDDSD
,
ppSurf
,
pOuter
);
return
DIB_DirectDrawSurface_Create
(
This
,
pDDSD
,
ppSurf
,
pOuter
);
}
HRESULT
...
...
@@ -312,6 +320,7 @@ create_texture(IDirectDrawImpl* This, const DDSURFACEDESC2 *pDDSD,
prev_mipmap
=
*
ppSurf
;
IDirectDrawSurface7_AddRef
(
prev_mipmap
);
mipmap_surface_desc
=
ddsd
;
mipmap_surface_desc
.
ddsCaps
.
dwCaps2
|=
DDSCAPS2_MIPMAPSUBLEVEL
;
while
(
more_mipmaps
(
&
mipmap_surface_desc
))
{
...
...
@@ -762,6 +771,19 @@ Main_DirectDraw_FlipToGDISurface(LPDIRECTDRAW7 iface)
return
DD_OK
;
}
HRESULT
WINAPI
Main_DirectDraw_GetCaps
(
LPDIRECTDRAW7
iface
,
LPDDCAPS
pDriverCaps
,
LPDDCAPS
pHELCaps
)
{
ICOM_THIS
(
IDirectDrawImpl
,
iface
);
TRACE
(
"(%p,%p,%p), stub
\n
"
,
This
,
pDriverCaps
,
pHELCaps
);
if
(
pDriverCaps
!=
NULL
)
DD_STRUCT_COPY_BYSIZE
(
pDriverCaps
,
&
This
->
caps
);
if
(
pHELCaps
!=
NULL
)
DD_STRUCT_COPY_BYSIZE
(
pHELCaps
,
&
This
->
caps
);
return
DD_OK
;
}
/* GetCaps */
/* GetDeviceIdentifier */
/* GetDIsplayMode */
...
...
@@ -890,6 +912,26 @@ Main_DirectDraw_SetCooperativeLevel(LPDIRECTDRAW7 iface, HWND hwnd,
This
->
window
=
hwnd
;
This
->
cooperative_level
=
cooplevel
;
This
->
local
.
hWnd
=
hwnd
;
This
->
local
.
dwLocalFlags
|=
DDRAWILCL_SETCOOPCALLED
;
/* not entirely sure about these */
if
(
cooplevel
&
DDSCL_EXCLUSIVE
)
This
->
local
.
dwLocalFlags
|=
DDRAWILCL_HASEXCLUSIVEMODE
;
if
(
cooplevel
&
DDSCL_FULLSCREEN
)
This
->
local
.
dwLocalFlags
|=
DDRAWILCL_ISFULLSCREEN
;
if
(
cooplevel
&
DDSCL_ALLOWMODEX
)
This
->
local
.
dwLocalFlags
|=
DDRAWILCL_ALLOWMODEX
;
if
(
cooplevel
&
DDSCL_MULTITHREADED
)
This
->
local
.
dwLocalFlags
|=
DDRAWILCL_MULTITHREADED
;
if
(
cooplevel
&
DDSCL_FPUSETUP
)
This
->
local
.
dwLocalFlags
|=
DDRAWILCL_FPUSETUP
;
if
(
cooplevel
&
DDSCL_FPUPRESERVE
)
This
->
local
.
dwLocalFlags
|=
DDRAWILCL_FPUPRESERVE
;
if
(
This
->
local
.
lpGbl
)
{
/* assume that this app is the active app (in wine, there's
* probably only one app per global ddraw object anyway) */
if
(
cooplevel
&
DDSCL_EXCLUSIVE
)
This
->
local
.
lpGbl
->
lpExclusiveOwner
=
&
This
->
local
;
else
if
(
This
->
local
.
lpGbl
->
lpExclusiveOwner
==
&
This
->
local
)
This
->
local
.
lpGbl
->
lpExclusiveOwner
=
NULL
;
if
(
This
->
set_exclusive_mode
)
This
->
set_exclusive_mode
(
This
,
(
cooplevel
&
DDSCL_EXCLUSIVE
)
!=
0
);
}
ShowWindow
(
hwnd
,
SW_SHOW
);
DDRAW_SubclassWindow
(
This
);
...
...
dlls/ddraw/ddraw/main.h
View file @
c33e34cd
/* Copyright 2000 TransGaming Technologies Inc. */
/* Copyright 2000
-2001
TransGaming Technologies Inc. */
#ifndef WINE_DDRAW_DDRAW_MAIN_H_INCLUDED
#define WINE_DDRAW_DDRAW_MAIN_H_INCLUDED
...
...
@@ -27,7 +27,7 @@ void Main_DirectDraw_AddClipper(IDirectDrawImpl* This,
void
Main_DirectDraw_RemoveClipper
(
IDirectDrawImpl
*
This
,
IDirectDrawClipperImpl
*
clipper
);
void
Main_DirectDraw_AddPalette
(
IDirectDrawImpl
*
This
,
IDirectDrawPaletteImpl
*
surfac
e
);
IDirectDrawPaletteImpl
*
palett
e
);
void
Main_DirectDraw_RemovePalette
(
IDirectDrawImpl
*
This
,
IDirectDrawPaletteImpl
*
palette
);
...
...
@@ -63,6 +63,9 @@ HRESULT WINAPI
Main_DirectDraw_EvaluateMode
(
LPDIRECTDRAW7
iface
,
DWORD
a
,
DWORD
*
b
);
HRESULT
WINAPI
Main_DirectDraw_FlipToGDISurface
(
LPDIRECTDRAW7
iface
);
HRESULT
WINAPI
Main_DirectDraw_GetCaps
(
LPDIRECTDRAW7
iface
,
LPDDCAPS
pDriverCaps
,
LPDDCAPS
pHELCaps
);
HRESULT
WINAPI
Main_DirectDraw_GetFourCCCodes
(
LPDIRECTDRAW7
iface
,
LPDWORD
pNumCodes
,
LPDWORD
pCodes
);
HRESULT
WINAPI
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment